Skip to content

Authenticate to the API

Documentation Index

Fetch the complete documentation index at: https://docs.sourcery.ai/llms.txt

Use this file to discover all available pages before exploring further.

Create an API key and make your first request. The API authenticates with a bearer token, and the endpoints it reaches need a Team-plan account.

  1. Create a key

    Go to API Keys and create a key.

  2. Store it now

    The key is shown once, at creation. Copy it into your secret store right away. You can’t retrieve it later, so a lost key means creating a new one.

  3. Make a request

    Pass the key in the Authorization header as a bearer token:

    Terminal window
    curl https://api.sourcery.ai/api/v1/security-issues \
    -H "Authorization: Bearer $SOURCERY_API_KEY"