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

# Create a Deployment service account with the APC API

<Note>
  The examples on this page show common ways to use the APC API — they're not a complete API reference. For the full, interactive API documentation for your installation, including every available query, mutation, and type, go to `https://houston.<your-base-domain>/v1`, and click on the **Docs** tab. See [Develop and test APC API queries](/docs/astro-private-cloud/v-2-x/houston-api-develop-test) for more on using the built-in GraphQL explorer.
</Note>

You can also create a service account using the GraphQL API. The `deploymentUuid` field is the same Deployment ID (UUID) returned by `astro deployment list`.

```graphql wrap theme={null}
mutation {
  createDeploymentServiceAccount(
    deploymentUuid: "<deployment-id>"
    label: "CI/CD Pipeline"
    role: DEPLOYMENT_ADMIN
  ) {
    id
    apiKey
  }
}
```

Set in CI/CD environment:

```bash wrap theme={null}
export ASTRONOMER_KEY_ID=<service-account-id>
export ASTRONOMER_KEY_SECRET=<api-key>
```

For the full CI/CD setup, including Workspace-level service accounts and platform examples, see [Configure CI/CD on Astro Private Cloud](/docs/astro-private-cloud/v-2-x/ci-cd).
