---
title: "Update a custom API action"
method: PATCH
path: "/credits/custom-endpoints/{providerId}/endpoints/{endpointId}"
tags: ["Custom APIs"]
---

# Update a custom API action

`PATCH /credits/custom-endpoints/{providerId}/endpoints/{endpointId}`

## Request

- Base URL: `https://api.paywithlocus.com/api`
- URL: `https://api.paywithlocus.com/api/credits/custom-endpoints/{providerId}/endpoints/{endpointId}`
- Auth: HTTP bearer

Updates one action without changing its stable slug. Contract and pricing changes are revalidated; a pricing change increments pricingRevision. Requires the enterprise owner with credentials:manage, catalog:write, and recent step-up.

## Path parameters

- `providerId` string, uuid, required
- `endpointId` string, uuid, required

## Request body

- CustomEndpointUpdateRequest: Any non-empty subset of the create fields except slug. Unspecified fields remain unchanged; all affected contracts and prices are revalidated.
  - `name` string
  - `description` string
  - `method` 'GET' | 'POST' | 'PUT' | 'PATCH' | 'DELETE'
  - `path` string
  - `inputSchema` object
  - `inputExample` object
  - `outputSchema` object, nullable
  - `outputExample` unknown
  - `providerCostUsdc` union
    - string: Non-negative exact decimal string with at most six fractional digits. Endpoint-specific positivity and amount limits still apply.
    - number
  - `markupBps` integer
  - `flatMarkupUsdc` union
    - string: Non-negative exact decimal string with at most six fractional digits. Endpoint-specific positivity and amount limits still apply.
    - number
  - `enabled` boolean

## Response `200`

Action updated

- CustomEndpointResponse
  - `success` unknown, required
  - `endpoint` CustomEndpoint, required
    - `id` string, uuid, required
    - `slug` string, required
    - `publicSlug` string, required: Catalog and execution identity.
    - `name` string, required
    - `description` string, required
    - `method` 'GET' | 'POST' | 'PUT' | 'PATCH' | 'DELETE', required
    - `path` string, required
    - `inputSchema` object, required
    - `inputExample` object, required
    - `outputSchema` object, nullable, required
    - `outputExample` unknown, required
    - `providerCostUsdc` string, required: Non-negative exact decimal string with at most six fractional digits. Endpoint-specific positivity and amount limits still apply.
    - `markupBps` integer, required
    - `flatMarkupUsdc` string, required: Non-negative exact decimal string with at most six fractional digits. Endpoint-specific positivity and amount limits still apply.
    - `endUserPriceUsdc` string, required: Non-negative exact decimal string with at most six fractional digits. Endpoint-specific positivity and amount limits still apply.
    - `enabled` boolean, required
    - `pricingRevision` integer, required
    - `createdAt` string, date-time, required
    - `updatedAt` string, date-time, required

## Other responses

- `400`: No changes or invalid schema, example, path, pricing, or action configuration
- `403`: Feature, enterprise plan, owner, scope, or recent step-up requirement not met
- `404`: Custom provider or action not found in this workspace

---

[API](https://skmtc.dev/paywithlocus/apis/locus-pro-api.md) - [All operations](https://skmtc.dev/paywithlocus/apis/locus-pro-api/llms.txt) - [OpenAPI document](https://skmtc.dev/paywithlocus/apis/locus-pro-api/revisions/aab8fa5d6cef?raw)
