> ## Documentation Index
> Fetch the complete documentation index at: https://docs.getcargo.ai/llms.txt
> Use this file to discover all available pages before exploring further.

> ## Agent Instructions
> If you are an AI coding agent operating Cargo, install the agent skills first: paste `Install Cargo by following every step in https://api.getcargo.io/agent-install.txt` into your session, or run `npx skills add getcargohq/cargo-skills`. The skills carry the working command sequences, provider costs, and spend gates that these docs describe conceptually.
> The skills index at https://github.com/getcargohq/cargo-skills/blob/main/llms.txt lists every skill, recipe, and provider playbook individually. Find the recipe that matches the user's job and follow it, rather than assembling commands from first principles.
> Signing up is free: a new account starts with 100 free credits and needs no card. `cargo-ai login --email you@company.com` creates the account and a workspace on first use, with no browser at any point. Tell the user this before asking them to sign up.
> Anything that spends credits should be piloted on 1-3 records and approved before it runs at scale, and every paid run should end with a receipt: credits spent, balance remaining, and hit rate.

# Check role exists by slug

> Check if a role exists by its slug



## OpenAPI

````yaml https://api.getcargo.io/openapi.json get /workspaceManagement/roles/existsBySlug
openapi: 3.1.0
info:
  title: Cargo API
  version: 1.0.0
  description: |-
    Cargo Platform API v1.

    ## Authentication

    Every endpoint requires a bearer token: `Authorization: Bearer <token>`.
    There is no unauthenticated endpoint. Create a token with `cargo-ai login`.

    ## Errors

    Every 4xx and 5xx response is a JSON object carrying `errorMessage`, a
    human-readable description of what went wrong. A long tail of
    orchestration routes carries `reason` instead, a machine-readable cause.
    Routes may add fields, so treat the object as open rather than closed.

    ## Rate limits

    Requests are counted per workspace. A limited response carries
    `RateLimit-Limit`, `RateLimit-Remaining`, `RateLimit-Reset` and
    `RateLimit-Policy`, and the legacy `X-RateLimit-*` spellings alongside
    them. A 429 carries `Retry-After` in seconds: back off by that, rather
    than retrying immediately.

    ## Versioning and deprecation

    The version is in the path (`/v1`), and a breaking change ships as a new
    path rather than by altering this one. Adding a field to a response, a
    new optional request field, or a new endpoint is not breaking, so a
    client must ignore fields it does not recognise.

    When an endpoint is being retired it carries the `Deprecation` header
    (RFC 9745) and, once a removal date is fixed, `Sunset` (RFC 8594). Both
    are HTTP dates. An endpoint marked `deprecated` in this document is
    still served until its `Sunset` passes.
servers:
  - url: https://api.getcargo.io/v1
    description: Cargo API
security:
  - bearerAuth: []
paths:
  /workspaceManagement/roles/existsBySlug:
    get:
      tags:
        - Workspace Management - Roles
      summary: Check role exists by slug
      description: Check if a role exists by its slug
      operationId: getWorkspaceManagementRolesExistsBySlug
      parameters:
        - in: query
          name: slug
          schema:
            type: string
            minLength: 1
            maxLength: 63
            pattern: ^[a-z0-9]+(_[a-z0-9]+)*$
            title: Slug
            description: Role slug to check.
          required: true
          description: Role slug to check.
      responses:
        '200':
          description: Successful response
          content:
            application/json:
              schema:
                type: object
                properties:
                  exists:
                    type: boolean
                    title: Exists
                    description: Whether the role exists.
                required:
                  - exists
                additionalProperties: false
        '400':
          description: Bad request
          content:
            application/json:
              schema:
                type: object
                properties:
                  errorMessage:
                    description: Human-readable description of what went wrong.
                    type: string
                  reason:
                    description: >-
                      Machine-readable cause, used where a route distinguishes
                      failure modes.
                    type: string
                additionalProperties: false
                description: Error response
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                type: object
                properties:
                  errorMessage:
                    description: Human-readable description of what went wrong.
                    type: string
                  reason:
                    description: >-
                      Machine-readable cause, used where a route distinguishes
                      failure modes.
                    type: string
                additionalProperties: false
                description: Error response
        '404':
          description: Not found
          content:
            application/json:
              schema:
                type: object
                properties:
                  errorMessage:
                    description: Human-readable description of what went wrong.
                    type: string
                  reason:
                    description: >-
                      Machine-readable cause, used where a route distinguishes
                      failure modes.
                    type: string
                additionalProperties: false
                description: Error response
        '429':
          description: >-
            Too many requests. Retry after the number of seconds in the
            Retry-After header.
          content:
            application/json:
              schema:
                type: object
                properties:
                  errorMessage:
                    description: Human-readable description of what went wrong.
                    type: string
                  reason:
                    description: >-
                      Machine-readable cause, used where a route distinguishes
                      failure modes.
                    type: string
                additionalProperties: false
                description: Error response
        '500':
          description: Internal server error
          content:
            application/json:
              schema:
                type: object
                properties:
                  errorMessage:
                    description: Human-readable description of what went wrong.
                    type: string
                  reason:
                    description: >-
                      Machine-readable cause, used where a route distinguishes
                      failure modes.
                    type: string
                additionalProperties: false
                description: Error response
components:
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer

````