Skip to content
Terra WalletDevelopers

Early access. The Terra API and SDKs may change before launch, and the SDK packages are not published yet.

View as Markdown

API reference

Early access

Projects and allowed origins

A project groups keys and settings inside an organization. Allowed origins lock publishable keys to your own https sites.

Authentication: Dashboard session with the X-Terra-Org header.

Guide: Authentication

MethodPathSummary
GET/v1/projectsProjects of the organization
POST/v1/projectsCreate a project (owner, admin, developer)
GET/v1/projects/{id}One project
PATCH/v1/projects/{id}Rename a project (owner, admin, developer)
GET/v1/projects/{id}/originsAllowed origins for publishable keys
PUT/v1/projects/{id}/originsReplace the allowed origins (exact https origins, at most 20)

GET/v1/projects#

Projects of the organization

  • Operation id: PlatformProjectsController_list (contract name: listProjects)
  • Authentication: Secret key or dashboard session

Headers#

NameTypeRequiredNotes
X-Terra-OrgstringnoDashboard sessions: the organization to act for (org_...). API keys carry their own.

Query parameters#

NameTypeRequiredNotes
limitintegerno
starting_afterstringno

Response#

Status 200.

NameTypeRequiredNotes
dataarray of objectyes
has_morebooleanyes
next_cursorstringyes

POST/v1/projects#

Create a project (owner, admin, developer)

  • Operation id: PlatformProjectsController_create (contract name: createProject)
  • Authentication: Dashboard session
  • Idempotency-Key: required

Headers#

NameTypeRequiredNotes
X-Terra-OrgstringnoDashboard sessions: the organization to act for (org_...). API keys carry their own.
Idempotency-Keystringyes8 to 128 characters, kept 24 hours.

Request body#

NameTypeRequiredNotes
namestringyeslength 1 to 80

Response#

Status 201.

NameTypeRequiredNotes
idstringyes
objectstring (project)yes
namestringyes
created_atstring (date-time)yes
updated_atstring (date-time)yes

Notes#

  • The request body is not spelled out in the contract yet; the OpenAPI document will define it.

GET/v1/projects/{id}#

One project

  • Operation id: PlatformProjectsController_get (contract name: getProject)
  • Authentication: Secret key or dashboard session

Headers#

NameTypeRequiredNotes
X-Terra-OrgstringnoDashboard sessions: the organization to act for (org_...). API keys carry their own.

Path parameters#

NameTypeRequiredNotes
idstringyesproj_...

Response#

Status 200.

NameTypeRequiredNotes
idstringyes
objectstring (project)yes
namestringyes
created_atstring (date-time)yes
updated_atstring (date-time)yes

PATCH/v1/projects/{id}#

Rename a project (owner, admin, developer)

  • Operation id: PlatformProjectsController_update (contract name: updateProject)
  • Authentication: Dashboard session

Headers#

NameTypeRequiredNotes
X-Terra-OrgstringnoDashboard sessions: the organization to act for (org_...). API keys carry their own.

Path parameters#

NameTypeRequiredNotes
idstringyesproj_...

Request body#

NameTypeRequiredNotes
namestringyeslength 1 to 80

Response#

Status 200.

NameTypeRequiredNotes
idstringyes
objectstring (project)yes
namestringyes
created_atstring (date-time)yes
updated_atstring (date-time)yes

GET/v1/projects/{id}/origins#

Allowed origins for publishable keys

  • Operation id: PlatformProjectsController_origins (contract name: getAllowedOrigins)
  • Authentication: Secret key or dashboard session

Headers#

NameTypeRequiredNotes
X-Terra-OrgstringnoDashboard sessions: the organization to act for (org_...). API keys carry their own.

Path parameters#

NameTypeRequiredNotes
idstringyesproj_...

Response#

Status 200.

NameTypeRequiredNotes
objectstring (allowed_origins)yes
project_idstringyes
originsarray of stringyes

PUT/v1/projects/{id}/origins#

Replace the allowed origins (exact https origins, at most 20)

  • Operation id: PlatformProjectsController_putOrigins (contract name: setAllowedOrigins)
  • Authentication: Dashboard session

Headers#

NameTypeRequiredNotes
X-Terra-OrgstringnoDashboard sessions: the organization to act for (org_...). API keys carry their own.

Path parameters#

NameTypeRequiredNotes
idstringyesproj_...

Request body#

NameTypeRequiredNotes
originsarray of stringyes

Response#

Status 200.

NameTypeRequiredNotes
objectstring (allowed_origins)yes
project_idstringyes
originsarray of stringyes

Notes#

  • Exact https origins only, for example https://shop.example.com. No wildcards and no paths.