Skip to content
Get started

Update a customer

CustomerV1 Customers.Update(CustomerUpdateParamsparameters, CancellationTokencancellationToken = default)
PUT/v1/customers/{id}

Updates an existing customer's information. This endpoint allows you to modify the customer's contact details, PII, and metadata.

ParametersExpand Collapse
CustomerUpdateParams parameters
required string id

Path param

formatuuid
required DeviceUnmaskedV1 device

Body param

required string email

Body param: The customer's email address.

formatemail
required string name

Body param: The customer's full name or business name.

required string phone

Body param: The customer's phone number in E.164 format.

required Status status

Body param

"pending"Pending
"review"Review
"verified"Verified
"inactive"Inactive
"rejected"Rejected

Body param: An object containing the customer's address. This is optional, but if provided, all required fields must be present.

ComplianceProfile? complianceProfile

Body param: Individual PII data required to trigger Patriot Act compliant KYC verification.

class IndividualComplianceProfile:

Individual PII data required to trigger Patriot Act compliant KYC verification.

required DateOnly? Dob

Date of birth (YYYY-MM-DD). Required for Patriot Act-compliant KYC verification.

formatdate
required string? Ssn

Social Security Number (format XXX-XX-XXXX). Required for Patriot Act-compliant KYC verification.

class BusinessComplianceProfile:

Business registration data required to trigger Patriot Act compliant KYB verification.

required string? Ein

Employer Identification Number (format XX-XXXXXXX). Required for Patriot Act-compliant KYB verification.

Official registered business name as listed with the IRS. This value will be matched against the 'legal_business name'.

IReadOnlyList<Representative>? Representatives

A list of people related to the company. Only valid where customer type is 'business'.

required string Name
string? Email
string? Phone
string? Website

Official business website URL. Optional but recommended for enhanced KYB.

formaturi
string? externalID

Body param: Unique identifier for the customer in your database, used for cross-referencing between Straddle and your systems.

IReadOnlyDictionary<string, string>? metadata

Body param: Up to 20 additional user-defined key-value pairs. Useful for storing additional information about the customer in a structured format.

string correlationID

Header param: Optional client generated identifier to trace and debug a series of requests.

string idempotencyKey

Header param: Optional client generated value to use for idempotent requests.

maxLength40
minLength10
string requestID

Header param: Optional client generated identifier to trace and debug a request.

string straddleAccountID

Header param: For use by platforms to specify an account id and set scope of a request.

formatuuid
ReturnsExpand Collapse
class CustomerV1:
required Data Data
required string ID

Unique identifier for the customer.

formatuuid
required DateTimeOffset CreatedAt

Timestamp of when the customer record was created.

formatdate-time
required string Email

The customer's email address.

formatemail
required string Name

Full name of the individual or business name.

required string Phone

The customer's phone number in E.164 format.

required Status Status
One of the following:
"pending"Pending
"review"Review
"verified"Verified
"inactive"Inactive
"rejected"Rejected
required Type Type
One of the following:
"individual"Individual
"business"Business
required DateTimeOffset UpdatedAt

Timestamp of the most recent update to the customer record.

formatdate-time

An object containing the customer's address. This is optional, but if provided, all required fields must be present.

required string Address1

Primary address line (e.g., street, PO Box).

maxLength100
required string City

City, district, suburb, town, or village.

maxLength100
required string State

Two-letter state code.

required string Zip

Zip or postal code.

string? Address2

Secondary address line (e.g., apartment, suite, unit, or building).

maxLength100
ComplianceProfile? ComplianceProfile

PII required to trigger Patriot Act compliant KYC verification.

One of the following:
class IndividualComplianceProfile:

PII required to trigger Patriot Act compliant KYC verification.

required DateOnly? Dob

Masked date of birth in ****-- format.

formatdate
required string? Ssn

Masked Social Security Number in the format --***.

class BusinessComplianceProfile:

Business registration data required to trigger Patriot Act compliant KYB verification.

required string? Ein

Masked Employer Identification Number in the format -*****

The official registered name of the business. This name should be correlated with the ein value.

IReadOnlyList<Representative>? Representatives

A list of people related to the company. Only valid where customer type is 'business'.

required string Name
string? Email
string? Phone
string? Website

Official business website URL. Optional but recommended for enhanced KYB.

formaturi
Config Config
ProcessingMethod ProcessingMethod
One of the following:
"inline"Inline
"background"Background
"skip"Skip
SandboxOutcome SandboxOutcome
One of the following:
"standard"Standard
"verified"Verified
"rejected"Rejected
"review"Review
Device Device
required string IPAddress

The customer's IP address at the time of profile creation. Use 0.0.0.0 to represent an offline customer registration.

minLength1
formatipv4
string? ExternalID

Unique identifier for the customer in your database, used for cross-referencing between Straddle and your systems.

IReadOnlyDictionary<string, string>? Metadata

Up to 20 additional user-defined key-value pairs. Useful for storing additional information about the customer in a structured format.

required ResponseMetadata Meta

Metadata about the API request, including an identifier and timestamp.

required string ApiRequestID

Unique identifier for this API request, useful for troubleshooting.

formatuuid
required DateTimeOffset ApiRequestTimestamp

Timestamp for this API request, useful for troubleshooting.

formatdate-time
required ResponseType ResponseType

Indicates the structure of the returned content.

  • "object" means the data field contains a single JSON object.
  • "array" means the data field contains an array of objects.
  • "error" means the data field contains an error object with details of the issue.
  • "none" means no data is returned.
One of the following:
"object"Object
"array"Array
"error"Error
"none"None

Update a customer

CustomerUpdateParams parameters = new()
{
    ID = "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
    Device = new("192.168.1.1"),
    Email = "dev@stainless.com",
    Name = "name",
    Phone = "+46991022",
    Status = Status.Pending,
};

var customerV1 = await client.Customers.Update(parameters);

Console.WriteLine(customerV1);
{
  "data": {
    "id": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
    "created_at": "2019-12-27T18:11:19.117Z",
    "email": "ron.swanson@pawnee.com",
    "name": "Ron Swanson",
    "phone": "+12128675309",
    "status": "pending",
    "type": "individual",
    "updated_at": "2019-12-27T18:11:19.117Z",
    "address": {
      "address1": "123 Main St",
      "city": "Anytown",
      "state": "CA",
      "zip": "12345",
      "address2": "Apt 1"
    },
    "compliance_profile": {
      "dob": "2019-12-27",
      "ssn": "***-**-****"
    },
    "config": {
      "processing_method": "inline",
      "sandbox_outcome": "standard"
    },
    "device": {
      "ip_address": "192.168.1.1"
    },
    "external_id": "external_id",
    "metadata": {
      "foo": "string"
    }
  },
  "meta": {
    "api_request_id": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
    "api_request_timestamp": "2019-12-27T18:11:19.117Z"
  },
  "response_type": "object"
}
Returns Examples
{
  "data": {
    "id": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
    "created_at": "2019-12-27T18:11:19.117Z",
    "email": "ron.swanson@pawnee.com",
    "name": "Ron Swanson",
    "phone": "+12128675309",
    "status": "pending",
    "type": "individual",
    "updated_at": "2019-12-27T18:11:19.117Z",
    "address": {
      "address1": "123 Main St",
      "city": "Anytown",
      "state": "CA",
      "zip": "12345",
      "address2": "Apt 1"
    },
    "compliance_profile": {
      "dob": "2019-12-27",
      "ssn": "***-**-****"
    },
    "config": {
      "processing_method": "inline",
      "sandbox_outcome": "standard"
    },
    "device": {
      "ip_address": "192.168.1.1"
    },
    "external_id": "external_id",
    "metadata": {
      "foo": "string"
    }
  },
  "meta": {
    "api_request_id": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
    "api_request_timestamp": "2019-12-27T18:11:19.117Z"
  },
  "response_type": "object"
}