# xCures API Hub > Developer docs for the xCures API: authentication, workflows, agent skills, and the full API reference. Start with the AI agents page. It covers the base URL, authentication, the ProjectId header, the safe call order, pagination, polling, retries, and the status codes to branch on. The API calls a patient a subject. The agent skills index is at https://docs.xcures.com/.well-known/agent-skills/index.json. ## Start here - [AI Agents | xCures API Hub](https://docs.xcures.com/ai-agents.md): Use the xCures API with AI agents. Discovery files, authentication, safe call order, pagination, polling, retries, and status codes. ## API reference - [xCures API](https://docs.xcures.com/apis/current.md): # Authentication Our API requires a Bearer Token in the `Authorization` header for auth. Most of our endpoints also require a `ProjectId` header to set the context of the request. It must be one of the projects the api client has permissions to. ### Getting a token To get a token, use your `client_id` and `client_secret` to execute a client credentials exchange. #### Example CURL command: curl --request POST --url https://partner.xcures.com/oauth/token --header 'content-type: application/json' --data '{"client_id":"{your_client_id}","client_secret":"{your_client_secret}","grant_type":"client_credentials"}' #### Response: { "access_token": "{your_temporary_access_token}", "token_type": "Bearer" } ### Using the token with our API: Now just include that bearer token in the `Authorization` header of your requests to our API. #### Example authorized request: curl --request GET --url https://partner.xcures.com/api/v1/patient-registry/subject --header 'ProjectId: {your_project_id}' --header 'authorization: Bearer {your_temporary_access_token}'