Skip to content

CreateApiKey

POST
https://orgs.ezghcloud.com/v1/organizations/{orgId}/api-keys

Authorization

  • apiKeyoptionalHTTP
  • sessionCookieoptionalAPI key in cookie
  • oauthoptionalHTTP

Path parameters

  • orgIdstringrequired

Header parameters

  • idempotency-keyoptionalstring

Request bodyJSONrequired

  • namestringrequired
  • botIdoptionalstring
    format: uuid, pattern: ^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|[fF]{8}-[fF]{4}-[fF]{4}-[fF]{4}-[fF]{12})$
  • expiresInDaysoptionalinteger
    maximum: 365, minimum: 1

Returns

201

Success

JSON
  • apiKeyobjectrequired
    9 properties
    • idstringrequired
    • organizationIdstringrequired
    • namestringrequired
    • prefixstringrequired
    • ownerobjectrequired
      2 properties
      • typeuserorbotrequired
      • idstringrequired
    • createdBystringrequired
    • createdAtstringrequired
    • lastUsedAtstringornullrequired
      2 variants

      One of the following:

      • string
      • null
    • expiresAtstringornullrequired
      2 variants

      One of the following:

      • string
      • null
  • tokenstringrequired

400

InvalidRequest

JSON
  • errorobjectrequired
    3 properties
    • codeinvalid_requestrequired
    • messagestringrequired
    • issuesoptionalarray ofobject
      2 properties
      • pathstringrequired
      • messagestringrequired

401

Unauthenticated

JSON
  • errorobjectrequired
    2 properties
    • codeunauthenticatedrequired
    • messagestringrequired

403

Forbidden | AccessDenied | ForbiddenOrigin

JSON

One of the following:

404

NotFound

JSON
  • errorobjectrequired
    2 properties
    • codenot_foundrequired
    • messagestringrequired

409

IdempotencyConflict | IdempotencyInProgress

JSON

One of the following:

429

TooManyRequests

JSON
  • errorobjectrequired
    2 properties
    • codetoo_many_requestsrequired
    • messagestringrequired

500

InternalError

JSON
  • errorobjectrequired
    2 properties
    • codeinternal_errorrequired
    • messagestringrequired

503

Unavailable

JSON
  • errorobjectrequired
    2 properties
    • codeunavailablerequired
    • messagestringrequired
Navigation

Type to search…

↑↓ navigate↵ selectEsc close