Tokens

Update API token

Update an existing API token's properties including scopes, expiration, and contractor access

put/api/tokens/{tokenId}

Request

  • Base URL: https://api.sc-market.space
  • URL: https://api.sc-market.space/api/tokens/{tokenId}
  • Auth: none declared

Path parameters

tokenIdstring required

ID of the token to update

Request body

namestring

Name for the API token

descriptionstring

Optional description for the API token

scopesstring[]

Array of scopes for the token. Admin scopes (admin:, admin) and moderation scopes (moderation:) are only available to admin users.

expires_atstring date-time

Optional expiration date for the token

contractor_spectrum_idsstring[]

Optional array of contractor Spectrum IDs that this token can access. Set to null to remove all contractor access.

Example request

{
  "name": "My Updated API Token",
  "description": "Updated token description",
  "scopes": [
    "market:read",
    "orders:write"
  ],
  "expires_at": "2024-12-31T23:59:59Z",
  "contractor_spectrum_ids": [
    "ORG-12345",
    "ORG-67890"
  ]
}

Response

Token updated successfully

Changes

No recorded changes to this operation across all 5 revisions of this API.