---
title: "Create a credential"
method: POST
path: "/v3/connectors/{provider}/creds"
tags: ["Connector credentials"]
---

# Create a credential

`POST /v3/connectors/{provider}/creds`

Manually create a credential record.

## Path parameters

- `provider` 'google' | 'microsoft' | 'imap' | 'icloud' | 'yahoo' | 'ews' | 'virtual-calendar' | 'zoom' | 'nylas', required

## Request body

- union
  - object — Override the default connector with another auth app.
    - `name` string, required — The name of the credential. Must be unique.
    - `credential_type` string, required — The type of the credential. Set this value to `connector` if you have multiple provider auth applications for a single provider and need to create an override credential. </br></br> For example, if you have two Google provider auth apps, the Google connector for each application can only connect to one of those Google auth apps by default. You can set up a connector override credential, however, then specify that credential ID in authentication requests so that the request goes through the Google connector, but goes to the non-default Google auth app.
    - `credential_data` object, required — An object that contains special information that must be included in the credential. This information is securely encrypted and stored, and isn't visible to users. You must include data such as the `client_id` and `client_secret` for the provider auth application.
  - object — Service account credential for Google App Permission.
    - `name` string, required — The name of the credential. Must be unique.
    - `credential_type` string, required — The type of the credential. For the App Permission flow (currently supported for [Google App Permission](/docs/v3/auth/bulk-auth-grants/#google-app-permission-via-nylas) only), the type must be `serviceaccount`.
    - `credential_data` object, required — An object that specifies some special information required for the credential. This information is securely encoded and stored, and is _not_ visible to end users. </br></br> For the [Google App Permission flow](/docs/v3/auth/bulk-auth-grants/#google-app-permission-via-nylas), this field must contain the `private_key_id`, `private_key`, and `client_email`.
  - object — Admin consent credential for Microsoft bulk auth.
    - `name` string, required — The name of the credential. Must be unique.
    - `credential_type` string, required — The type of the credential. For the [Microsoft Admin Consent flow](/docs/v3/auth/bulk-auth-grants/#use-a-microsoft-bulk-authentication-grant), the type must be `adminconsent`.
    - `credential_data` object, required — An object that specifies some special information required for the credential. This information is securely encoded and stored, and isn't visible to users. For the Microsoft Admin Consent 2.0 flow, this field must contain the `tenant` (either yours or the user's). If you don't specify the Azure `client_id` and `client_secret` Nylas uses the information from your Nylas application's Microsoft connector.

## Response `201`

The credential is created.

- object
  - `request_id` string — The request ID.
  - `data` CredentialObject
    - `id` string, required — Credential ID
    - `name` string, required — Unique name of this credential
    - `created_at` integer, required — Date of creation of the credential
    - `updated_at` integer, required — Initially same as `created_at`. Can differ if the credential has been updated.

## Other responses

- `400` — Bad Request
- `401` — Not Authenticated

---

[API](https://skmtc.dev/nylas/apis/nylas-api.md) · [All operations](https://skmtc.dev/nylas/apis/nylas-api/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/nylas/nylas-api/revisions/51c2c1b4ecff/schema)
