Unkey · Example Payload

Unkey Identitiescreateidentity Example

API KeysRate LimitingAuthenticationDeveloper PlatformAccess ControlIdentityAnalytics

Unkey Identitiescreateidentity Example is an example object payload from Unkey, with 6 top-level fields. It illustrates the shape of data this provider's APIs accept or return.

Top-level fields

operationIdmethodpathsummaryrequestExamplesresponseExamples

Example Payload

Raw ↑
{
  "operationId": "identities.createIdentity",
  "method": "POST",
  "path": "/v2/identities.createIdentity",
  "summary": "Create Identity",
  "requestExamples": [
    {
      "contentType": "application/json",
      "name": "basic",
      "example": {
        "externalId": "user_123"
      }
    },
    {
      "contentType": "application/json",
      "name": "withMetadata",
      "example": {
        "externalId": "user_123",
        "meta": {
          "email": "alice@example.com",
          "name": "Alice Smith",
          "plan": "premium"
        }
      }
    },
    {
      "contentType": "application/json",
      "name": "withRatelimits",
      "example": {
        "externalId": "user_123",
        "ratelimits": [
          {
            "duration": 60000,
            "limit": 1000,
            "name": "requests"
          }
        ]
      }
    }
  ],
  "responseExamples": [
    {
      "status": "200",
      "contentType": "application/json",
      "name": "success",
      "example": {
        "meta": {
          "requestId": "req_01H9TQPP77V5E48E9SH0BG0ZQX"
        }
      }
    },
    {
      "status": "403",
      "contentType": "application/json",
      "name": "missingPermission",
      "example": {
        "error": {
          "detail": "Your root key requires the 'identity.*.create_identity' permission to perform this operation",
          "status": 403,
          "title": "Forbidden",
          "type": "forbidden"
        },
        "meta": {
          "requestId": "req_0uVwX4yZaAbCdEfGhIjKl"
        }
      }
    },
    {
      "status": "409",
      "contentType": "application/json",
      "name": "identityExists",
      "example": {
        "error": {
          "detail": "Identity with externalId \"user_abc123\" already exists in this workspace.",
          "status": 409,
          "title": "Conflict",
          "type": "conflict"
        },
        "meta": {
          "requestId": "req_2wXyZaAbCdEfGhIjKlMnOp"
        }
      }
    }
  ]
}