apiCredentials

Create an API Credential

Create a new API Credential for the specified Organization.

post/v1/organizations/{organizationId}/api-credentials

Path parameters

organizationIdstring required

The <code>id</code> of the Organization where you want to create the API Credential.

Request body

namestring required

Human-readable name of the API Credential.

descriptionstring required

Brief description of the purpose and usage for the API Credential.

enabledboolean required

If <code>true</code>, the API Credential is enabled. Otherwise, <code>false</code>.

ipAllowliststring[]

CIDR range enforced as the IP allowlist for the API Credential.

Example request

{
  "name": "Auto-Manage-Workspaces",
  "description": "Used for automated Workspace management",
  "enabled": true,
  "roles": {
    "workspaces": [
      {
        "workspaceId": "main"
      }
    ]
  },
  "ipAllowlist": [
    "10.0.0.1/32"
  ]
}

Response

API Credential created

namestring required

Human-readable name of the API Credential.

descriptionstring required

Brief description of the purpose and usage for the API Credential.

enabledboolean required

If <code>true</code>, the API Credential is enabled. Otherwise, <code>false</code>.

organizationIdstring required

Unique ID of the Organization.

clientIdstring required

Client ID for the API Credential.

ipAllowliststring[] required

CIDR range enforced as the IP allowlist for the API Credential. An empty array means that the API Credential has no IP restrictions.

createdBystring required

Member who created the API Credential.

createdDatestring date-time required

ISO 8601 timestamp when the API Credential was created.

lastUpdatedBystring required

Member who last updated the API Credential.

lastUpdatedDatestring date-time required

ISO 8601 timestamp when the API Credential was last updated.

clientSecretstring required

Client Secret for the API Credential. The Client Secret is sensitive information and should be kept private. Returned only in the <code>POST</code> response when the API Credential is created. Never returned in <code>GET</code> responses. If you need the Client Secret again, you must rotate credentials and retrieve the new Client Secret from the <code>POST</code> response.

Example response

{
  "name": "Auto-Manage-Workspaces",
  "description": "Used for automated Workspace management",
  "enabled": true,
  "organizationId": "org-123",
  "clientId": "clientIdabcd1234EXAMPLE",
  "roles": {
    "workspaces": [
      {
        "workspaceId": "main"
      }
    ]
  },
  "ipAllowlist": [
    "10.0.0.1/32"
  ],
  "createdBy": "user@example.com",
  "createdDate": "2024-08-15T12:34:56.000Z",
  "lastUpdatedBy": "user@example.com",
  "lastUpdatedDate": "2024-08-15T12:34:56.000Z",
  "clientSecret": "clientSecretabcd1234EXAMPLE"
}

Changes

Changed in 8 of the 41 revisions of this API.247

  • 6129323514c111See the full diff
    • added the new insights enum value to the ///////////// response property for the response status

      response-property-enum-value-added

    • added the new insights enum value to the request property /////////////

      request-property-enum-value-added

    • added the new optional request property

      new-optional-request-property

    • added the required property to the response with the status

      response-required-property-added

    • added the non-success response with the status

      response-non-success-status-added

    • the request property's maxLength was set to 140

      request-property-max-length-set

    • added the non-success response with the status

      response-non-success-status-added

    This revision also has 1 change that name no endpoint, such as unreferenced schemas being removed. See the revision's changelog

  • bfa460b2aec3111See the full diff
    • added the pattern ^[A-Za-z0-9-]+$ to the request property

      request-property-pattern-added

    • the request property's maxLength was set to 140

      request-property-max-length-set

    • the response's property pattern ^[A-Za-z0-9-]+$ was added for the status

      response-property-pattern-added

    • removed the required property from the response with the status

      response-required-property-removed

    • removed the request property

      request-property-removed

    • endpoint added

      endpoint-added

    This revision also has 1 change that name no endpoint, such as unreferenced schemas being removed. See the revision's changelog