# Provision funding endpoint

Source: https://business-api-docs.youhodler.com/docs/api/reference/funding-endpoints/funding-endpoints-create

Provisions a new deposit-side endpoint. Crypto routes to the custody rails backend. Fiat requests carry only `account_ref` and `routing`; the pooled fiat route owner is derived server-side inside `rails-router-service` rather than supplied in the request body, and provisioning is delegated to `fiat-rails-service` after the route-guard/availability pipeline approves the route. Idempotent on the required `Idempotency-Key` header.

## Request

**Request URL — POST**
```http
POST /funding-endpoints
```

**Request Body — application/json**
```json
{
  "account_ref": "client-accounts/b8e2f1a0-4c3d-4e5f-9a1b-2c3d4e5f6a7b",
  "rail_class": "crypto",
  "routing": {
    "asset": "USDC",
    "network": "ethereum"
  }
}
```

## Responses

**201 Resource created successfully**

Resource created successfully.

```json
{
  "account_ref": "client-accounts/b8e2f1a0-4c3d-4e5f-9a1b-2c3d4e5f6a7b",
  "asset": "USDC",
  "created_at": "2026-05-01T10:00:00Z",
  "crypto_routing": {
    "asset": "USDC",
    "endpoint": {
      "address": "0xAbCd1234567890AbCd1234567890AbCd12345678",
      "memo": null
    },
    "network": "ethereum"
  },
  "fiat_rail": null,
  "fiat_routing": null,
  "id": "b8e2f1a0-4c3d-4e5f-9a1b-2c3d4e5f6a7b",
  "network": "ethereum",
  "rail_class": "crypto",
  "status": "active",
  "updated_at": "2026-05-01T10:00:00Z"
}
```

**400 Invalid request payload**

Invalid request payload, query, or parameter shape.

```json
{
  "code": "invalid_request",
  "message": "crypto funding endpoint routing must include only asset and network"
}
```

**401 Caller is not authenticated or the bearer token is invalid**

Caller is not authenticated or the bearer token is invalid.

```json
{
  "code": "unauthorized",
  "message": "Authentication required."
}
```

**403 Caller lacks the required capability or permitted scope**

Caller lacks the required capability or permitted scope.

```json
{
  "code": "forbidden_capability_scope",
  "details": {
    "reason": "missing_capability"
  },
  "message": "Insufficient capability for this operation."
}
```

**409 State conflict — the request cannot be applied to the current resource state**

State conflict — the request cannot be applied to the current resource state.

```json
{
  "code": "idempotency_conflict",
  "details": {
    "reason": "idempotency_conflict"
  },
  "message": "A funding endpoint with this idempotency key already exists."
}
```

**422 Operation is not admissible — it violates a business rule**

Operation is not admissible — it violates a business rule, policy constraint, or lifecycle precondition specific to this resource.

```json
{
  "code": "provisioning_rejected",
  "details": {
    "reason": "not_admissible"
  },
  "message": "Funding endpoint provisioning was rejected by the rail provider."
}
```

**429 Request rate limit exceeded**

Request rate limit exceeded. Retry after the delay indicated in the `details.retry_after_ms` field.

```json
{
  "code": "rate_limited",
  "details": {
    "retry_after_ms": 5000
  },
  "message": "Too many requests."
}
```

**502 Upstream service returned an unexpected error**

Upstream service returned an unexpected error.

```json
{
  "code": "upstream_error",
  "message": "An upstream service returned an unexpected error."
}
```

**503 Service is temporarily unavailable**

Service is temporarily unavailable; retry with backoff.

```json
{
  "code": "provider_unavailable",
  "details": {
    "reason": "service_temporarily_unavailable"
  },
  "message": "The selected rail provider is currently unavailable."
}
```

**Related endpoints:**

- `GET` [Get funding endpoint](/docs/api/reference/funding-endpoints/funding-endpoints-get) — Read the created endpoint
- `GET` [List deposit instructions](/docs/api/reference/deposit-instructions/deposit-instructions-list) — Deposit instructions become available after creation
