API reference
Organizations
Generated HTTP reference for the 1 operation the published OpenAPI document describes under organizations.
1 min read
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
| Name | Type | Required | Description |
|---|---|---|---|
id | string | yes | The 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
| Status | Body | Description |
|---|---|---|
200 | object | OK |
404 | object | The id is not the calling credential's organization. Also what a caller gets for an organization that exists but is not theirs. |
500 | object | The authenticated organization has no row. A defect on our side, not a caller error. |
Response 200
| Field | Type | Required | Description |
|---|---|---|---|
created_at | string (date-time) | yes | — |
id | string | yes | Echoes the path parameter, which is always the caller's own organization. |
name | string | yes | — |
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"