api-tokens

Create API Token

Changed on

Create an API Token. The API Token created must use a subset of permissions the API token creating them.

This endpoint consumes 10 units of your quota.

This endpoint requires the following org token scopes:

  • api-tokens:create
post/orgs/{org_slug}/api-tokens

Request

  • Base URL
    https://api.socket.dev/v0
  • URL
    https://api.socket.dev/v0/orgs/{org_slug}/api-tokens
  • Auth
    • HTTP bearer
    • or HTTP basic

Path parameters

org_slugstring required

The slug of the organization

Request body

max_quotainteger required

Maximum number of API calls allowed per month

scopesstring[] required

List of scopes granted to the API Token

visibility'admin' | 'organization' required

The visibility of the API Token. Warning: this field is deprecated and will be removed in the future.

namestring

Name for the API Token

Response

The newly created api token with its stable UUID and hash.

created_bystring uuid nullable required

ID of the Socket user who created the API Token

group_uuidstring uuid required

The stable group UUID that remains constant across token rotations

tokenstring required
hashstring required

Changes

    • info

      added the new alert-policy enum value to the request property /

    • info

      added the new alert-policy:create enum value to the request property /

    • info

      added the new alert-policy:delete enum value to the request property /

    • info

      added the new alert-policy:list enum value to the request property /

    • info

      added the new alert-policy:read enum value to the request property /

    • info

      added the new alert-policy:update enum value to the request property /

    • info

      added the new selected-organization enum value to the request property /

    • info

      added the new socket-firewall-deployment enum value to the request property /

    • info

      added the new socket-firewall-deployment:update enum value to the request property /

    • info

      added the new vulnerability-feed enum value to the request property /

    • info

      added the new vulnerability-feed:list enum value to the request property /