Calls without X-API-Key need no key. Calls with it need a paid plan — get a key.
Get an API key
Free tier, no form to fill in. Signing in shares your email address with us — we
store it to create your key and to recognise you if you sign in with another
provider. See our Privacy Policy and
Terms.
openapi: 3.2.0
info:
title: SlashID Tokens API
description: This is the OpenAPI specification for communicating with the SlashID service.
version: '1.1'
termsOfService: https://www.slashid.dev/terms-of-use/
contact:
name: API Support
email: contact@slashid.dev
servers:
- url: https://api.slashid.com
description: Production
- url: https://api.sandbox.slashid.com
description: Sandbox
security:
- ApiKeyAuth: []
tags:
- name: Tokens
paths:
/token/revoke:
parameters:
- $ref: '#/components/parameters/OptionalSdkVersionHeader'
post:
operationId: PostTokenRevoke
tags:
- Tokens
summary: Revoke a user token
description: This endpoint revokes a SlashID user token.
parameters:
- $ref: '#/components/parameters/RequiredConsistencyHeader'
- $ref: '#/components/parameters/RequiredConsistencyTimeoutHeader'
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/RevokeTokenReq'
required: true
responses:
'204':
$ref: '#/components/responses/NoContent'
'400':
$ref: '#/components/responses/BadRequest'
'408':
$ref: '#/components/responses/Timeout'
components:
responses:
NoContent:
description: No content
Timeout:
description: 'Request Timeout - operation exceeded the timeout limit from SlashID-Required-Consistency-Timeout.
The operation may still be in progress, and will be completed eventually.'
content:
application/json:
schema:
$ref: '#/components/schemas/APIResponseBase'
BadRequest:
description: Bad Request
content:
application/json:
schema:
$ref: '#/components/schemas/APIResponseBase'
schemas:
APIPagination:
type: object
required:
- limit
- offset
- total_count
properties:
limit:
type: integer
offset:
type: integer
total_count:
type: integer
format: int64
RevokeTokenReq:
required:
- token
type: object
properties:
token:
$ref: '#/components/schemas/TokenText'
APIResponseBase:
type: object
properties:
meta:
$ref: '#/components/schemas/APIMeta'
errors:
type: array
items:
$ref: '#/components/schemas/APIResponseError'
APIMeta:
type: object
properties:
pagination:
$ref: '#/components/schemas/APIPagination'
cursor_pagination:
$ref: '#/components/schemas/APICursorPagination'
APICursorPagination:
type: object
required:
- limit
- cursor
- total_count
properties:
limit:
type: integer
cursor:
type: string
total_count:
type: integer
format: int64
APIResponseError:
type: object
properties:
httpcode:
type: integer
message:
type: string
TokenText:
description: A JWT token. Can be either a User token (`UserTokenText`) or a Token Container (`TokenContainerText`)
type: string
parameters:
RequiredConsistencyTimeoutHeader:
name: SlashID-Required-Consistency-Timeout
in: header
description: 'The maximum amount of seconds to wait for the requested consistency level to be achieved. If the consistency level is not achieved within this time, the request will fail with a 408 Request Timeout error.
408 Request Timeout error indicates that request was not handled within the timeout, but it may still be handled after request timeout.
You can learn more about our replication model on our [Cross-region Replication Model](/docs/access/concepts/replication) page.
'
schema:
type: integer
default: 30
maximum: 120
minimum: 1
RequiredConsistencyHeader:
name: SlashID-Required-Consistency
in: header
description: 'The consistency level required for this request. If the consistency level is not achieved within the timeout, the request will fail with a 408 Request Timeout error.
408 Request Timeout error indicates that request was not handled within the timeout, but it may still be handled after request timeout.
Allowed values: * `local_region`: Wait while the request executes in the local region. * `all_regions`: Wait while the request executes across all regions.
You can learn more about our replication model on our [Cross-region Replication Model](/docs/access/concepts/replication) page.
'
schema:
type: string
enum:
- local_region
- all_regions
default: local_region
OptionalSdkVersionHeader:
name: SlashID-SdkVersion
in: header
schema:
type: string
required: false
description: Optional SDK version
example: 1.4.1
securitySchemes:
ApiKeyAuth:
description: Authorizes the request with the organization's API Key.
x-svc-um-api: true
type: apiKey
in: header
name: SlashID-API-Key
OAuth2ClientIdSecret:
description: Authorizes the request with a client ID/client secret pair
type: http
scheme: basic
OAuth2AccessTokenBearer:
description: Authorizes the request with an Access Token for the current user.
type: http
scheme: bearer
bearerFormat: opaque