---
title: "Create New Client Secret"
method: POST
path: "/v2/credentials/secrets"
tags: ["Client Credentials"]
---

# Create New Client Secret

`POST /v2/credentials/secrets`

## Request

- Base URL: `https://dc1demogw.paylocity.com/api`
- URL: `https://dc1demogw.paylocity.com/api/v2/credentials/secrets`
- Auth: OAuth 2
  - Client credentials
  - Token URL: `https://api.paylocity.com/IdentityServer/connect/token` scopes: `WebLinkAPI`

Create new client secret for Paylocity-issued client id. See Weblink Authentication section for details.

## Request body

- AddClientSecret: The Add Client Secret Request Model
  - `code` string, required: A value sent with the 'ACTION NEEDED: Web Link API Credentials Expiring Soon.' email notification.

## Response `200`

Successfully added

- ClientCredentialsResponse[]
  - `clientSecret` string: The client's secret
  - `clientSecretExpirationDate` string, paylocity-date: The client's secret expiration date

## Other responses

- `400`: Bad Request
- `401`: Unauthorized
- `403`: Forbidden
- `429`: Too Many Requests
- `500`: Internal Server Error

---

[API](https://skmtc.dev/paylocity/apis/weblink-api.md) - [All operations](https://skmtc.dev/paylocity/apis/weblink-api/llms.txt) - [OpenAPI document](https://skmtc.dev/paylocity/apis/weblink-api/revisions/8152ed40b412?raw)
