Prisma Service Tokens API

The Service Tokens API from Prisma — 2 operation(s) for service tokens.

Operations 3

Each operation below carries the questions people ask an LLM about it and the instructions they give an agent to run it. Generated by API Evangelist overlay

GET /v1/workspaces/{workspaceId}/service-tokens List a workspace's service tokens · List service tokens #
Ask an LLM
“Which service tokens exist for my workspace?”
“Are service tokens listed newest first?”
Tell an agent
List the service tokens in workspace {workspaceId}.
Show {limit} service tokens for {workspaceId}.
POST /v1/workspaces/{workspaceId}/service-tokens Create a workspace service token · Create service token #
Ask an LLM
“How do I create a service token for CI in my workspace?”
“Can I view a service token's value again after it is created?”
Tell an agent
Create a service token named {name} in workspace {workspaceId}.
Mint service token {name} for {workspaceId}.
DELETE /v1/workspaces/{workspaceId}/service-tokens/{serviceTokenId} Revoke a workspace service token · Delete service token #
Ask an LLM
“How do I revoke a service token that is no longer needed?”
“Does deleting a service token revoke it immediately?”
Tell an agent destructive · confirm first
Delete service token {serviceTokenId} from workspace {workspaceId}.
Revoke {serviceTokenId} in {workspaceId}.

Work with this as data

Every API here is available over the APIs.io API and to AI agents over MCP.

MCP server

One button, every client — Claude, Cursor, VS Code and the rest.

https://apis.io/mcp

Tools for apis

7 MCP tools reach this
  • find_apisBrowse and filter every API in the catalog.
  • get_api_artifactsOne API's artifacts, grouped by type.
  • get_openapiThe primary OpenAPI for this API.
  • find_similar_apisAPIs that look like this one.
  • apis_io_searchSTART HERE — APIs, providers and tags for one query, each with its total.
  • resolveTurn a domain, URL or GitHub org into the provider it belongs to.
  • find_cohortsEvery scored population of providers in the catalog.
All 92 tools →

Call it yourself

curl for this page
This API
curl "https://apis.io/api/v1/apis/prisma:prisma-service-tokens-api"
All apis
curl "https://apis.io/api/v1/apis?limit=25"

Discovery needs no key. Ratings and market analysis are Pro.

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.

A second provider on the same verified email joins the account you already have.

OpenAPI Specification

prisma-service-tokens-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  title: Prisma Postgres Management Service Tokens API
  description: REST API for managing Prisma Postgres projects, databases, backups, and workspaces.
  version: v1
servers:
- url: https://api.prisma.io
security:
- OAuth2:
  - workspace:admin
  - offline_access
- Bearer: []
tags:
- name: Service Tokens
paths:
  /v1/workspaces/{workspaceId}/service-tokens:
    get:
      responses:
        '200':
          description: Returns the list of service tokens. Empty when the workspace does not exist or the caller is not a member of it.
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    type: array
                    items:
                      type: object
                      properties:
                        id:
                          type: string
                          pattern: ^(itgr_)([cC][^\s-]{8,}|[a-z0-9]+)$
                        type:
                          type: string
                          const: serviceToken
                        name:
                          type: string
                        valueHint:
                          type: string
                        createdAt:
                          type: string
                          format: date-time
                        expiresAt:
                          type:
                          - string
                          - 'null'
                          format: date-time
                      required:
                      - id
                      - type
                      - name
                      - valueHint
                      - createdAt
                  pagination:
                    type: object
                    properties:
                      nextCursor:
                        type:
                        - string
                        - 'null'
                        description: Next cursor to continue pagination
                      hasMore:
                        type: boolean
                        description: Whether there are more items to paginate
                    required:
                    - nextCursor
                    - hasMore
                required:
                - data
                - pagination
        '401':
          description: Missing or invalid authorization token.
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: object
                    properties:
                      code:
                        type: string
                      message:
                        type: string
                      hint:
                        type: string
                    required:
                    - code
                    - message
                required:
                - error
      operationId: getV1WorkspacesByWorkspaceIdService-tokens
      tags:
      - Service Tokens
      parameters:
      - in: path
        name: workspaceId
        schema:
          type: string
          pattern: ^(wksp_)?([cC][^\s-]{8,}|[a-z0-9]+)$
        required: true
      - in: query
        name: cursor
        schema:
          type:
          - string
          - 'null'
          description: Cursor for pagination
      - in: query
        name: limit
        schema:
          type: integer
          minimum: 1
          maximum: 100
          default: 100
          description: Page size, 1-100
      summary: List service tokens
      description: Returns the service tokens for the given workspace, newest first.
    post:
      responses:
        '201':
          description: Created a new service token. The token value is returned once in the response body.
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    type: object
                    properties:
                      id:
                        type: string
                        pattern: ^(itgr_)([cC][^\s-]{8,}|[a-z0-9]+)$
                      type:
                        type: string
                        const: serviceToken
                      name:
                        type: string
                      valueHint:
                        type: string
                      createdAt:
                        type: string
                        format: date-time
                      expiresAt:
                        type:
                        - string
                        - 'null'
                        format: date-time
                      value:
                        type: string
                    required:
                    - id
                    - type
                    - name
                    - valueHint
                    - createdAt
                    - value
                required:
                - data
        '401':
          description: Missing or invalid authorization token.
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: object
                    properties:
                      code:
                        type: string
                      message:
                        type: string
                      hint:
                        type: string
                    required:
                    - code
                    - message
                required:
                - error
        '404':
          description: Workspace with the given ID was not found.
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: object
                    properties:
                      code:
                        type: string
                      message:
                        type: string
                      hint:
                        type: string
                    required:
                    - code
                    - message
                required:
                - error
        '422':
          description: Invalid request parameters.
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: object
                    properties:
                      code:
                        type: string
                      message:
                        type: string
                      hint:
                        type: string
                    required:
                    - code
                    - message
                required:
                - error
      operationId: postV1WorkspacesByWorkspaceIdService-tokens
      tags:
      - Service Tokens
      parameters:
      - in: path
        name: workspaceId
        schema:
          type: string
          pattern: ^(wksp_)?([cC][^\s-]{8,}|[a-z0-9]+)$
        required: true
      summary: Create service token
      description: Creates a new service token for the given workspace. The `value` field is returned exactly once in this response and is never stored — copy it immediately.
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                name:
                  type: string
                  minLength: 1
                  maxLength: 256
                  description: Display name for the service token.
              required:
              - name
  /v1/workspaces/{workspaceId}/service-tokens/{serviceTokenId}:
    delete:
      responses:
        '204':
          description: Deleted the service token successfully.
        '401':
          description: Missing or invalid authorization token.
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: object
                    properties:
                      code:
                        type: string
                      message:
                        type: string
                      hint:
                        type: string
                    required:
                    - code
                    - message
                required:
                - error
        '404':
          description: Workspace not found, or the service token does not exist in it.
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: object
                    properties:
                      code:
                        type: string
                      message:
                        type: string
                      hint:
                        type: string
                    required:
                    - code
                    - message
                required:
                - error
      operationId: deleteV1WorkspacesByWorkspaceIdService-tokensByServiceTokenId
      tags:
      - Service Tokens
      parameters:
      - in: path
        name: workspaceId
        schema:
          type: string
          pattern: ^(wksp_)?([cC][^\s-]{8,}|[a-z0-9]+)$
        required: true
      - in: path
        name: serviceTokenId
        schema:
          type: string
          pattern: ^(itgr_)?([cC][^\s-]{8,}|[a-z0-9]+)$
        required: true
      summary: Delete service token
      description: Revokes the service token with the given ID by deleting it.
components:
  securitySchemes:
    OAuth2:
      type: oauth2
      description: OAuth2 authentication
      flows:
        authorizationCode:
          authorizationUrl: https://auth.prisma.io/authorize
          tokenUrl: https://auth.prisma.io/token
          refreshUrl: https://auth.prisma.io/token
          scopes:
            workspace:admin: Full access to workspace resources
            offline_access: Offline access
    Bearer:
      type: http
      scheme: bearer
      bearerFormat: JWT
      description: OAuth2 token for API authentication