# Create Access Key

Creates an Access Key for the given project. Returns the new key and
 its credentials.

Endpoint: POST /v1/projects/{projectId}/accessKeys
Version: v1
Security: OAuth2, Basic

## Security:

  - `OAuth2` (unknown)
    oauth2

  - `Basic` (unknown)
    http basic

## Path parameters:

  - `projectId` (string, required)

## Request fields (application/json):

  - `displayName` (string)
    Required. The display name for this Access Key. It must be unique for the resource tied to the key.

## Request examples:

  - `Create an Access Key for a project.` (unknown)

## Response 200:

  - `200` (unknown)
    OK

## Response 200 fields (application/json):

  - `accessKey` (object)
    The newly created Access Key.

  - `accessKey.accessKeyId` (string)
    Unique ID for this Access Key.

  - `accessKey.displayName` (string)
    The display name for this Access Key. It must be unique for the resource tied to the key.

  - `accessKey.projectId` (string)
    The project ID this key is tied to.

  - `accessKey.createTime` (string)
    Timestamp when the Access Key was created.

  - `accessKey.updateTime` (string)
    Timestamp when the Access Key was last modified.

  - `secret` (string)
    The Access Key secret. After an Access Key has been created it is impossible to
 retrieve its secret again.

## Response 400:

  - `400` (unknown)
    Malformed request

## Response 400 fields (application/json):

  - `error` (object)

  - `error.code` (integer)

  - `error.details` (array)

  - `error.details.type_url` (string)

  - `error.details.value` (string)

  - `error.message` (string)

  - `error.status` (string)

## Response 401:

  - `401` (unknown)
    Unauthenticated. Incorrect credentials.

## Response 403:

  - `403` (unknown)
    Permission denied.

## Response 409:

  - `409` (unknown)
    Conflict

## Response 409 fields (application/json):

  - `error` (object)

  - `error.code` (integer)

  - `error.details` (array)

  - `error.details.type_url` (string)

  - `error.details.value` (string)

  - `error.message` (string)

  - `error.status` (string)

## Response 500:

  - `500` (unknown)
    Internal error, try again with exponential back-off

## Response 500 fields (application/json):

  - `error` (object)

  - `error.code` (integer)

  - `error.details` (array)

  - `error.details.type_url` (string)

  - `error.details.value` (string)

  - `error.message` (string)

  - `error.status` (string)

## Response 503:

  - `503` (unknown)
    Unavailable, try again with exponential back-off

## Response 503 fields (application/json):

  - `error` (object)

  - `error.code` (integer)

  - `error.details` (array)

  - `error.details.type_url` (string)

  - `error.details.value` (string)

  - `error.message` (string)

  - `error.status` (string)

## Response 400 examples:

  - `invalidArgument` (unknown)

  - `failedPrecondition` (unknown)

