Skip to main content
API reference

Organizations

Generated HTTP reference for the 1 operation the published OpenAPI document describes under organizations.

1 min read
View MarkdownEdit on GitHub

Organizations

This page is generated from the published OpenAPI document. It is complete with respect to that document and says nothing about surfaces the document does not describe yet. See what is generated here for what that means.

Base URL: https://api.codespar.dev

Every operation below requires a Bearer token. See Authentication.

GET /v1/organizations/{id}

Read the organization this credential belongs to

Path parameters

NameTypeRequiredDescription
idstringyesThe calling credential's own organization id — take it from GET /v1/whoami rather than constructing it. DO NOT ASSUME AN org_ PREFIX: a developer working outside a shared organization is provisioned into a personal namespace whose id is user_ followed by their user id, and that is a real organization row and a legal value here.

Responses

StatusBodyDescription
200objectOK
404objectThe id is not the calling credential's organization. Also what a caller gets for an organization that exists but is not theirs.
500objectThe authenticated organization has no row. A defect on our side, not a caller error.

Response 200

FieldTypeRequiredDescription
created_atstring (date-time)yes
idstringyesEchoes the path parameter, which is always the caller's own organization.
namestringyes

Example response

{
  "id": "obj_0000000000000000",
  "name": "Example",
  "created_at": "2026-01-15T12:00:00.000Z"
}

Example request

curl -X GET https://api.codespar.dev/v1/organizations/{id} \
  -H "Authorization: Bearer $CODESPAR_API_KEY"
Organizations | CodeSpar