# Embed # Accounts ## Lookup an account `$ straddle embed:accounts get` **get** `/v1/accounts/{account_id}` Retrieves the details of an account that has previously been created. Supply the unique account ID that was returned from your previous request, and Straddle will return the corresponding account information. ### Parameters - `--account-id: string` The unique identifier of the account to retrieve. - `--correlation-id: optional string` Optional client generated identifier to trace and debug a series of requests. - `--request-id: optional string` Optional client generated identifier to trace and debug a request. ### Returns - `accountV1: object { data, meta, response_type }` - `data: object { id, access_level, organization_id, 11 more }` - `id: string` Unique identifier for the account. - `access_level: "standard" or "managed"` The access level granted to the account. This is determined by your platform configuration. Use `standard` unless instructed otherwise by Straddle. - `"standard"` - `"managed"` - `organization_id: string` The unique identifier of the organization this account belongs to. - `status: "created" or "onboarding" or "active" or 2 more` The current status of the account (e.g., 'active', 'inactive', 'pending'). - `"created"` - `"onboarding"` - `"active"` - `"rejected"` - `"inactive"` - `status_detail: object { code, message, reason, source }` - `code: string` A machine-readable code for the specific status, useful for programmatic handling. - `message: string` A human-readable message describing the current status. - `reason: "unverified" or "in_review" or "pending" or 6 more` A machine-readable identifier for the specific status, useful for programmatic handling. - `"unverified"` - `"in_review"` - `"pending"` - `"stuck"` - `"verified"` - `"failed_verification"` - `"disabled"` - `"terminated"` - `"new"` - `source: "watchtower"` Identifies the origin of the status change (e.g., `bank_decline`, `watchtower`). This helps in tracking the cause of status updates. - `"watchtower"` - `type: "business"` The type of account (e.g., 'individual', 'business'). - `"business"` - `business_profile: optional object { name, website, address, 7 more }` - `name: string` The operating or trade name of the business. - `website: string` URL of the business's primary marketing website. - `address: optional object { address1, city, line1, 6 more }` The address object is optional. If provided, it must be a valid address. - `address1: string` Primary address line (e.g., street, PO Box). - `city: string` City, district, suburb, town, or village. - `line1: string` Primary address line (e.g., street, PO Box). - `postal_code: string` Postal or ZIP code. - `state: string` Two-letter state code. - `zip: string` Zip or postal code. - `address2: optional string` Secondary address line (e.g., apartment, suite, unit, or building). - `country: optional string` The country of the address, in ISO 3166-1 alpha-2 format. - `line2: optional string` Secondary address line (e.g., apartment, suite, unit, or building). - `description: optional string` A brief description of the business and its products or services. - `industry: optional object { category, mcc, sector }` - `category: optional string` The general category of the industry. Required if not providing MCC. - `mcc: optional string` The Merchant Category Code (MCC) that best describes the business. Optional. - `sector: optional string` The specific sector within the industry category. Required if not providing MCC. - `legal_name: optional string` The official registered name of the business. - `phone: optional string` The primary contact phone number for the business. - `support_channels: optional object { email, phone, url }` - `email: optional string` The email address for customer support inquiries. - `phone: optional string` The phone number for customer support. - `url: optional string` The URL of the business's customer support page or contact form. - `tax_id: optional string` The business's tax identification number (e.g., EIN in the US). - `use_case: optional string` A description of how the business intends to use Straddle's services. - `capabilities: optional object { consent_types, customer_types, payment_types }` - `consent_types: object { internet, signed_agreement }` - `internet: object { capability_status }` Whether the internet payment authorization capability is enabled for the account. - `capability_status: "active" or "inactive"` - `"active"` - `"inactive"` - `signed_agreement: object { capability_status }` Whether the signed agreement payment authorization capability is enabled for the account. - `capability_status: "active" or "inactive"` - `customer_types: object { businesses, individuals }` - `businesses: object { capability_status }` - `capability_status: "active" or "inactive"` - `individuals: object { capability_status }` - `capability_status: "active" or "inactive"` - `payment_types: object { charges, payouts }` - `charges: object { capability_status }` - `capability_status: "active" or "inactive"` - `payouts: object { capability_status }` - `capability_status: "active" or "inactive"` - `created_at: optional string` Timestamp of when the account was created. - `external_id: optional string` Unique identifier for the account in your database, used for cross-referencing between Straddle and your systems. - `metadata: optional map[string]` Up to 20 additional user-defined key-value pairs. Useful for storing additional information about the account in a structured format. - `settings: optional object { charges, payouts }` - `charges: object { daily_amount, funding_time, linked_bank_account_id, 3 more }` - `daily_amount: number` The maximum dollar amount of charges in a calendar day. - `funding_time: "immediate" or "next_day" or "one_day" or 4 more` The amount of time it takes for a charge to be funded. This value is defined by Straddle. - `"immediate"` - `"next_day"` - `"one_day"` - `"two_day"` - `"three_day"` - `"four_day"` - `"five_day"` - `linked_bank_account_id: string` The unique identifier of the linked bank account associated with charges. This value is defined by Straddle. - `max_amount: number` The maximum amount of a single charge. - `monthly_amount: number` The maximum dollar amount of charges in a calendar month. - `monthly_count: number` The maximum number of charges in a calendar month. - `payouts: object { daily_amount, funding_time, linked_bank_account_id, 3 more }` - `daily_amount: number` The maximum dollar amount of payouts in a day. - `funding_time: "immediate" or "next_day" or "one_day" or 4 more` The amount of time it takes for a payout to be funded. This value is defined by Straddle. - `"immediate"` - `"next_day"` - `"one_day"` - `"two_day"` - `"three_day"` - `"four_day"` - `"five_day"` - `linked_bank_account_id: string` The unique identifier of the linked bank account to use for payouts. - `max_amount: number` The maximum amount of a single payout. - `monthly_amount: number` The maximum dollar amount of payouts in a month. - `monthly_count: number` The maximum number of payouts in a month. - `terms_of_service: optional object { accepted_date, agreement_type, agreement_url, 2 more }` - `accepted_date: string` The datetime of when the terms of service were accepted, in ISO 8601 format. - `agreement_type: "embedded" or "direct"` The type or version of the agreement accepted. Use `embedded` unless your platform was specifically enabled for `direct` agreements. - `"embedded"` - `"direct"` - `agreement_url: string` The URL where the full text of the accepted agreement can be found. - `accepted_ip: optional string` The IP address from which the terms of service were accepted. - `accepted_user_agent: optional string` The user agent string of the browser or application used to accept the terms. - `updated_at: optional string` Timestamp of the most recent update to the account. - `meta: object { api_request_id, api_request_timestamp }` Metadata about the API request, including an identifier and timestamp. - `api_request_id: string` Unique identifier for this API request, useful for troubleshooting. - `api_request_timestamp: string` Timestamp for this API request, useful for troubleshooting. - `response_type: "object" or "array" or "error" or "none"` 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. - `"object"` - `"array"` - `"error"` - `"none"` ### Example ```cli straddle embed:accounts get \ --api-key 'My API Key' \ --account-id 182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e ``` #### Response ```json { "data": { "id": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", "access_level": "standard", "organization_id": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", "status": "created", "status_detail": { "code": "code", "message": "message", "reason": "unverified", "source": "watchtower" }, "type": "business", "business_profile": { "name": "name", "website": "https://example.com", "address": { "address1": "address1", "city": "city", "line1": "line1", "postal_code": "21029-1360", "state": "SE", "zip": "zip", "address2": "address2", "country": "country", "line2": "line2" }, "description": "description", "industry": { "category": "category", "mcc": "mcc", "sector": "sector" }, "legal_name": "legal_name", "phone": "+46991022", "support_channels": { "email": "dev@stainless.com", "phone": "+46991022", "url": "https://example.com" }, "tax_id": "210297980", "use_case": "use_case" }, "capabilities": { "consent_types": { "internet": { "capability_status": "active" }, "signed_agreement": { "capability_status": "active" } }, "customer_types": { "businesses": { "capability_status": "active" }, "individuals": { "capability_status": "active" } }, "payment_types": { "charges": { "capability_status": "active" }, "payouts": { "capability_status": "active" } } }, "created_at": "2019-12-27T18:11:19.117Z", "external_id": "external_id", "metadata": { "foo": "string" }, "settings": { "charges": { "daily_amount": 0, "funding_time": "immediate", "linked_bank_account_id": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", "max_amount": 0, "monthly_amount": 0, "monthly_count": 0 }, "payouts": { "daily_amount": 0, "funding_time": "immediate", "linked_bank_account_id": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", "max_amount": 0, "monthly_amount": 0, "monthly_count": 0 } }, "terms_of_service": { "accepted_date": "2019-12-27T18:11:19.117Z", "agreement_type": "embedded", "agreement_url": "agreement_url", "accepted_ip": "accepted_ip", "accepted_user_agent": "accepted_user_agent" }, "updated_at": "2019-12-27T18:11:19.117Z" }, "meta": { "api_request_id": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", "api_request_timestamp": "2019-12-27T18:11:19.117Z" }, "response_type": "object" } ``` ## Update an account `$ straddle embed:accounts update` **put** `/v1/accounts/{account_id}` Updates an existing account's information. This endpoint allows you to update various account details during onboarding or after the account has been created. ### Parameters - `--account-id: string` Path param - `--business-profile: object { name, website, address, 7 more }` Body param - `--external-id: optional string` Body param: Unique identifier for the account in your database, used for cross-referencing between Straddle and your systems. - `--metadata: optional map[string]` Body param: Up to 20 additional user-defined key-value pairs. Useful for storing additional information about the account in a structured format. - `--correlation-id: optional string` Header param: Optional client generated identifier to trace and debug a series of requests. - `--idempotency-key: optional string` Header param: Optional client generated value to use for idempotent requests. - `--request-id: optional string` Header param: Optional client generated identifier to trace and debug a request. ### Returns - `accountV1: object { data, meta, response_type }` - `data: object { id, access_level, organization_id, 11 more }` - `id: string` Unique identifier for the account. - `access_level: "standard" or "managed"` The access level granted to the account. This is determined by your platform configuration. Use `standard` unless instructed otherwise by Straddle. - `"standard"` - `"managed"` - `organization_id: string` The unique identifier of the organization this account belongs to. - `status: "created" or "onboarding" or "active" or 2 more` The current status of the account (e.g., 'active', 'inactive', 'pending'). - `"created"` - `"onboarding"` - `"active"` - `"rejected"` - `"inactive"` - `status_detail: object { code, message, reason, source }` - `code: string` A machine-readable code for the specific status, useful for programmatic handling. - `message: string` A human-readable message describing the current status. - `reason: "unverified" or "in_review" or "pending" or 6 more` A machine-readable identifier for the specific status, useful for programmatic handling. - `"unverified"` - `"in_review"` - `"pending"` - `"stuck"` - `"verified"` - `"failed_verification"` - `"disabled"` - `"terminated"` - `"new"` - `source: "watchtower"` Identifies the origin of the status change (e.g., `bank_decline`, `watchtower`). This helps in tracking the cause of status updates. - `"watchtower"` - `type: "business"` The type of account (e.g., 'individual', 'business'). - `"business"` - `business_profile: optional object { name, website, address, 7 more }` - `name: string` The operating or trade name of the business. - `website: string` URL of the business's primary marketing website. - `address: optional object { address1, city, line1, 6 more }` The address object is optional. If provided, it must be a valid address. - `address1: string` Primary address line (e.g., street, PO Box). - `city: string` City, district, suburb, town, or village. - `line1: string` Primary address line (e.g., street, PO Box). - `postal_code: string` Postal or ZIP code. - `state: string` Two-letter state code. - `zip: string` Zip or postal code. - `address2: optional string` Secondary address line (e.g., apartment, suite, unit, or building). - `country: optional string` The country of the address, in ISO 3166-1 alpha-2 format. - `line2: optional string` Secondary address line (e.g., apartment, suite, unit, or building). - `description: optional string` A brief description of the business and its products or services. - `industry: optional object { category, mcc, sector }` - `category: optional string` The general category of the industry. Required if not providing MCC. - `mcc: optional string` The Merchant Category Code (MCC) that best describes the business. Optional. - `sector: optional string` The specific sector within the industry category. Required if not providing MCC. - `legal_name: optional string` The official registered name of the business. - `phone: optional string` The primary contact phone number for the business. - `support_channels: optional object { email, phone, url }` - `email: optional string` The email address for customer support inquiries. - `phone: optional string` The phone number for customer support. - `url: optional string` The URL of the business's customer support page or contact form. - `tax_id: optional string` The business's tax identification number (e.g., EIN in the US). - `use_case: optional string` A description of how the business intends to use Straddle's services. - `capabilities: optional object { consent_types, customer_types, payment_types }` - `consent_types: object { internet, signed_agreement }` - `internet: object { capability_status }` Whether the internet payment authorization capability is enabled for the account. - `capability_status: "active" or "inactive"` - `"active"` - `"inactive"` - `signed_agreement: object { capability_status }` Whether the signed agreement payment authorization capability is enabled for the account. - `capability_status: "active" or "inactive"` - `customer_types: object { businesses, individuals }` - `businesses: object { capability_status }` - `capability_status: "active" or "inactive"` - `individuals: object { capability_status }` - `capability_status: "active" or "inactive"` - `payment_types: object { charges, payouts }` - `charges: object { capability_status }` - `capability_status: "active" or "inactive"` - `payouts: object { capability_status }` - `capability_status: "active" or "inactive"` - `created_at: optional string` Timestamp of when the account was created. - `external_id: optional string` Unique identifier for the account in your database, used for cross-referencing between Straddle and your systems. - `metadata: optional map[string]` Up to 20 additional user-defined key-value pairs. Useful for storing additional information about the account in a structured format. - `settings: optional object { charges, payouts }` - `charges: object { daily_amount, funding_time, linked_bank_account_id, 3 more }` - `daily_amount: number` The maximum dollar amount of charges in a calendar day. - `funding_time: "immediate" or "next_day" or "one_day" or 4 more` The amount of time it takes for a charge to be funded. This value is defined by Straddle. - `"immediate"` - `"next_day"` - `"one_day"` - `"two_day"` - `"three_day"` - `"four_day"` - `"five_day"` - `linked_bank_account_id: string` The unique identifier of the linked bank account associated with charges. This value is defined by Straddle. - `max_amount: number` The maximum amount of a single charge. - `monthly_amount: number` The maximum dollar amount of charges in a calendar month. - `monthly_count: number` The maximum number of charges in a calendar month. - `payouts: object { daily_amount, funding_time, linked_bank_account_id, 3 more }` - `daily_amount: number` The maximum dollar amount of payouts in a day. - `funding_time: "immediate" or "next_day" or "one_day" or 4 more` The amount of time it takes for a payout to be funded. This value is defined by Straddle. - `"immediate"` - `"next_day"` - `"one_day"` - `"two_day"` - `"three_day"` - `"four_day"` - `"five_day"` - `linked_bank_account_id: string` The unique identifier of the linked bank account to use for payouts. - `max_amount: number` The maximum amount of a single payout. - `monthly_amount: number` The maximum dollar amount of payouts in a month. - `monthly_count: number` The maximum number of payouts in a month. - `terms_of_service: optional object { accepted_date, agreement_type, agreement_url, 2 more }` - `accepted_date: string` The datetime of when the terms of service were accepted, in ISO 8601 format. - `agreement_type: "embedded" or "direct"` The type or version of the agreement accepted. Use `embedded` unless your platform was specifically enabled for `direct` agreements. - `"embedded"` - `"direct"` - `agreement_url: string` The URL where the full text of the accepted agreement can be found. - `accepted_ip: optional string` The IP address from which the terms of service were accepted. - `accepted_user_agent: optional string` The user agent string of the browser or application used to accept the terms. - `updated_at: optional string` Timestamp of the most recent update to the account. - `meta: object { api_request_id, api_request_timestamp }` Metadata about the API request, including an identifier and timestamp. - `api_request_id: string` Unique identifier for this API request, useful for troubleshooting. - `api_request_timestamp: string` Timestamp for this API request, useful for troubleshooting. - `response_type: "object" or "array" or "error" or "none"` 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. - `"object"` - `"array"` - `"error"` - `"none"` ### Example ```cli straddle embed:accounts update \ --api-key 'My API Key' \ --account-id 182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e \ --business-profile '{name: name, website: https://example.com}' ``` #### Response ```json { "data": { "id": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", "access_level": "standard", "organization_id": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", "status": "created", "status_detail": { "code": "code", "message": "message", "reason": "unverified", "source": "watchtower" }, "type": "business", "business_profile": { "name": "name", "website": "https://example.com", "address": { "address1": "address1", "city": "city", "line1": "line1", "postal_code": "21029-1360", "state": "SE", "zip": "zip", "address2": "address2", "country": "country", "line2": "line2" }, "description": "description", "industry": { "category": "category", "mcc": "mcc", "sector": "sector" }, "legal_name": "legal_name", "phone": "+46991022", "support_channels": { "email": "dev@stainless.com", "phone": "+46991022", "url": "https://example.com" }, "tax_id": "210297980", "use_case": "use_case" }, "capabilities": { "consent_types": { "internet": { "capability_status": "active" }, "signed_agreement": { "capability_status": "active" } }, "customer_types": { "businesses": { "capability_status": "active" }, "individuals": { "capability_status": "active" } }, "payment_types": { "charges": { "capability_status": "active" }, "payouts": { "capability_status": "active" } } }, "created_at": "2019-12-27T18:11:19.117Z", "external_id": "external_id", "metadata": { "foo": "string" }, "settings": { "charges": { "daily_amount": 0, "funding_time": "immediate", "linked_bank_account_id": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", "max_amount": 0, "monthly_amount": 0, "monthly_count": 0 }, "payouts": { "daily_amount": 0, "funding_time": "immediate", "linked_bank_account_id": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", "max_amount": 0, "monthly_amount": 0, "monthly_count": 0 } }, "terms_of_service": { "accepted_date": "2019-12-27T18:11:19.117Z", "agreement_type": "embedded", "agreement_url": "agreement_url", "accepted_ip": "accepted_ip", "accepted_user_agent": "accepted_user_agent" }, "updated_at": "2019-12-27T18:11:19.117Z" }, "meta": { "api_request_id": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", "api_request_timestamp": "2019-12-27T18:11:19.117Z" }, "response_type": "object" } ``` ## Create an account `$ straddle embed:accounts create` **post** `/v1/accounts` Creates a new account associated with your Straddle platform integration. This endpoint allows you to set up an account with specified details, including business information and access levels. ### Parameters - `--access-level: "standard" or "managed"` Body param: The access level granted to the account. This is determined by your platform configuration. Use `standard` unless instructed otherwise by Straddle. - `--account-type: "business"` Body param: The type of account to be created. Currently, only `business` is supported. - `--business-profile: object { name, website, address, 7 more }` Body param - `--organization-id: string` Body param: The unique identifier of the organization related to this account. - `--external-id: optional string` Body param: Unique identifier for the account in your database, used for cross-referencing between Straddle and your systems. - `--metadata: optional map[string]` Body param: Up to 20 additional user-defined key-value pairs. Useful for storing additional information about the account in a structured format. - `--correlation-id: optional string` Header param: Optional client generated identifier to trace and debug a series of requests. - `--idempotency-key: optional string` Header param: Optional client generated value to use for idempotent requests. - `--request-id: optional string` Header param: Optional client generated identifier to trace and debug a request. ### Returns - `accountV1: object { data, meta, response_type }` - `data: object { id, access_level, organization_id, 11 more }` - `id: string` Unique identifier for the account. - `access_level: "standard" or "managed"` The access level granted to the account. This is determined by your platform configuration. Use `standard` unless instructed otherwise by Straddle. - `"standard"` - `"managed"` - `organization_id: string` The unique identifier of the organization this account belongs to. - `status: "created" or "onboarding" or "active" or 2 more` The current status of the account (e.g., 'active', 'inactive', 'pending'). - `"created"` - `"onboarding"` - `"active"` - `"rejected"` - `"inactive"` - `status_detail: object { code, message, reason, source }` - `code: string` A machine-readable code for the specific status, useful for programmatic handling. - `message: string` A human-readable message describing the current status. - `reason: "unverified" or "in_review" or "pending" or 6 more` A machine-readable identifier for the specific status, useful for programmatic handling. - `"unverified"` - `"in_review"` - `"pending"` - `"stuck"` - `"verified"` - `"failed_verification"` - `"disabled"` - `"terminated"` - `"new"` - `source: "watchtower"` Identifies the origin of the status change (e.g., `bank_decline`, `watchtower`). This helps in tracking the cause of status updates. - `"watchtower"` - `type: "business"` The type of account (e.g., 'individual', 'business'). - `"business"` - `business_profile: optional object { name, website, address, 7 more }` - `name: string` The operating or trade name of the business. - `website: string` URL of the business's primary marketing website. - `address: optional object { address1, city, line1, 6 more }` The address object is optional. If provided, it must be a valid address. - `address1: string` Primary address line (e.g., street, PO Box). - `city: string` City, district, suburb, town, or village. - `line1: string` Primary address line (e.g., street, PO Box). - `postal_code: string` Postal or ZIP code. - `state: string` Two-letter state code. - `zip: string` Zip or postal code. - `address2: optional string` Secondary address line (e.g., apartment, suite, unit, or building). - `country: optional string` The country of the address, in ISO 3166-1 alpha-2 format. - `line2: optional string` Secondary address line (e.g., apartment, suite, unit, or building). - `description: optional string` A brief description of the business and its products or services. - `industry: optional object { category, mcc, sector }` - `category: optional string` The general category of the industry. Required if not providing MCC. - `mcc: optional string` The Merchant Category Code (MCC) that best describes the business. Optional. - `sector: optional string` The specific sector within the industry category. Required if not providing MCC. - `legal_name: optional string` The official registered name of the business. - `phone: optional string` The primary contact phone number for the business. - `support_channels: optional object { email, phone, url }` - `email: optional string` The email address for customer support inquiries. - `phone: optional string` The phone number for customer support. - `url: optional string` The URL of the business's customer support page or contact form. - `tax_id: optional string` The business's tax identification number (e.g., EIN in the US). - `use_case: optional string` A description of how the business intends to use Straddle's services. - `capabilities: optional object { consent_types, customer_types, payment_types }` - `consent_types: object { internet, signed_agreement }` - `internet: object { capability_status }` Whether the internet payment authorization capability is enabled for the account. - `capability_status: "active" or "inactive"` - `"active"` - `"inactive"` - `signed_agreement: object { capability_status }` Whether the signed agreement payment authorization capability is enabled for the account. - `capability_status: "active" or "inactive"` - `customer_types: object { businesses, individuals }` - `businesses: object { capability_status }` - `capability_status: "active" or "inactive"` - `individuals: object { capability_status }` - `capability_status: "active" or "inactive"` - `payment_types: object { charges, payouts }` - `charges: object { capability_status }` - `capability_status: "active" or "inactive"` - `payouts: object { capability_status }` - `capability_status: "active" or "inactive"` - `created_at: optional string` Timestamp of when the account was created. - `external_id: optional string` Unique identifier for the account in your database, used for cross-referencing between Straddle and your systems. - `metadata: optional map[string]` Up to 20 additional user-defined key-value pairs. Useful for storing additional information about the account in a structured format. - `settings: optional object { charges, payouts }` - `charges: object { daily_amount, funding_time, linked_bank_account_id, 3 more }` - `daily_amount: number` The maximum dollar amount of charges in a calendar day. - `funding_time: "immediate" or "next_day" or "one_day" or 4 more` The amount of time it takes for a charge to be funded. This value is defined by Straddle. - `"immediate"` - `"next_day"` - `"one_day"` - `"two_day"` - `"three_day"` - `"four_day"` - `"five_day"` - `linked_bank_account_id: string` The unique identifier of the linked bank account associated with charges. This value is defined by Straddle. - `max_amount: number` The maximum amount of a single charge. - `monthly_amount: number` The maximum dollar amount of charges in a calendar month. - `monthly_count: number` The maximum number of charges in a calendar month. - `payouts: object { daily_amount, funding_time, linked_bank_account_id, 3 more }` - `daily_amount: number` The maximum dollar amount of payouts in a day. - `funding_time: "immediate" or "next_day" or "one_day" or 4 more` The amount of time it takes for a payout to be funded. This value is defined by Straddle. - `"immediate"` - `"next_day"` - `"one_day"` - `"two_day"` - `"three_day"` - `"four_day"` - `"five_day"` - `linked_bank_account_id: string` The unique identifier of the linked bank account to use for payouts. - `max_amount: number` The maximum amount of a single payout. - `monthly_amount: number` The maximum dollar amount of payouts in a month. - `monthly_count: number` The maximum number of payouts in a month. - `terms_of_service: optional object { accepted_date, agreement_type, agreement_url, 2 more }` - `accepted_date: string` The datetime of when the terms of service were accepted, in ISO 8601 format. - `agreement_type: "embedded" or "direct"` The type or version of the agreement accepted. Use `embedded` unless your platform was specifically enabled for `direct` agreements. - `"embedded"` - `"direct"` - `agreement_url: string` The URL where the full text of the accepted agreement can be found. - `accepted_ip: optional string` The IP address from which the terms of service were accepted. - `accepted_user_agent: optional string` The user agent string of the browser or application used to accept the terms. - `updated_at: optional string` Timestamp of the most recent update to the account. - `meta: object { api_request_id, api_request_timestamp }` Metadata about the API request, including an identifier and timestamp. - `api_request_id: string` Unique identifier for this API request, useful for troubleshooting. - `api_request_timestamp: string` Timestamp for this API request, useful for troubleshooting. - `response_type: "object" or "array" or "error" or "none"` 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. - `"object"` - `"array"` - `"error"` - `"none"` ### Example ```cli straddle embed:accounts create \ --api-key 'My API Key' \ --access-level standard \ --account-type business \ --business-profile '{name: name, website: https://example.com}' \ --organization-id 182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e ``` #### Response ```json { "data": { "id": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", "access_level": "standard", "organization_id": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", "status": "created", "status_detail": { "code": "code", "message": "message", "reason": "unverified", "source": "watchtower" }, "type": "business", "business_profile": { "name": "name", "website": "https://example.com", "address": { "address1": "address1", "city": "city", "line1": "line1", "postal_code": "21029-1360", "state": "SE", "zip": "zip", "address2": "address2", "country": "country", "line2": "line2" }, "description": "description", "industry": { "category": "category", "mcc": "mcc", "sector": "sector" }, "legal_name": "legal_name", "phone": "+46991022", "support_channels": { "email": "dev@stainless.com", "phone": "+46991022", "url": "https://example.com" }, "tax_id": "210297980", "use_case": "use_case" }, "capabilities": { "consent_types": { "internet": { "capability_status": "active" }, "signed_agreement": { "capability_status": "active" } }, "customer_types": { "businesses": { "capability_status": "active" }, "individuals": { "capability_status": "active" } }, "payment_types": { "charges": { "capability_status": "active" }, "payouts": { "capability_status": "active" } } }, "created_at": "2019-12-27T18:11:19.117Z", "external_id": "external_id", "metadata": { "foo": "string" }, "settings": { "charges": { "daily_amount": 0, "funding_time": "immediate", "linked_bank_account_id": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", "max_amount": 0, "monthly_amount": 0, "monthly_count": 0 }, "payouts": { "daily_amount": 0, "funding_time": "immediate", "linked_bank_account_id": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", "max_amount": 0, "monthly_amount": 0, "monthly_count": 0 } }, "terms_of_service": { "accepted_date": "2019-12-27T18:11:19.117Z", "agreement_type": "embedded", "agreement_url": "agreement_url", "accepted_ip": "accepted_ip", "accepted_user_agent": "accepted_user_agent" }, "updated_at": "2019-12-27T18:11:19.117Z" }, "meta": { "api_request_id": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", "api_request_timestamp": "2019-12-27T18:11:19.117Z" }, "response_type": "object" } ``` ## List accounts `$ straddle embed:accounts list` **get** `/v1/accounts` Returns a list of accounts associated with your Straddle platform integration. The accounts are returned sorted by creation date, with the most recently created accounts appearing first. This endpoint supports advanced sorting and filtering options. ### Parameters - `--external-id: optional string` Query param - `--page-number: optional number` Query param: Results page number. Starts at page 1. Default value: 1 - `--page-size: optional number` Query param: Page size. Default value: 100. Max value: 1000 - `--search-text: optional string` Query param - `--sort-by: optional string` Query param: Sort By. Default value: 'id'. - `--sort-order: optional "asc" or "desc"` Query param: Sort Order. Default value: 'asc'. - `--status: optional "created" or "onboarding" or "active" or 2 more` Query param - `--type: optional "business"` Query param - `--correlation-id: optional string` Header param: Optional client generated identifier to trace and debug a series of requests. - `--request-id: optional string` Header param: Optional client generated identifier to trace and debug a request. ### Returns - `accountPagedV1: object { data, meta, response_type }` - `data: array of object { id, access_level, organization_id, 11 more }` - `id: string` Unique identifier for the account. - `access_level: "standard" or "managed"` The access level granted to the account. This is determined by your platform configuration. Use `standard` unless instructed otherwise by Straddle. - `"standard"` - `"managed"` - `organization_id: string` The unique identifier of the organization this account belongs to. - `status: "created" or "onboarding" or "active" or 2 more` The current status of the account (e.g., 'active', 'inactive', 'pending'). - `"created"` - `"onboarding"` - `"active"` - `"rejected"` - `"inactive"` - `status_detail: object { code, message, reason, source }` - `code: string` A machine-readable code for the specific status, useful for programmatic handling. - `message: string` A human-readable message describing the current status. - `reason: "unverified" or "in_review" or "pending" or 6 more` A machine-readable identifier for the specific status, useful for programmatic handling. - `"unverified"` - `"in_review"` - `"pending"` - `"stuck"` - `"verified"` - `"failed_verification"` - `"disabled"` - `"terminated"` - `"new"` - `source: "watchtower"` Identifies the origin of the status change (e.g., `bank_decline`, `watchtower`). This helps in tracking the cause of status updates. - `"watchtower"` - `type: "business"` The type of account (e.g., 'individual', 'business'). - `"business"` - `business_profile: optional object { name, website, address, 7 more }` - `name: string` The operating or trade name of the business. - `website: string` URL of the business's primary marketing website. - `address: optional object { address1, city, line1, 6 more }` The address object is optional. If provided, it must be a valid address. - `address1: string` Primary address line (e.g., street, PO Box). - `city: string` City, district, suburb, town, or village. - `line1: string` Primary address line (e.g., street, PO Box). - `postal_code: string` Postal or ZIP code. - `state: string` Two-letter state code. - `zip: string` Zip or postal code. - `address2: optional string` Secondary address line (e.g., apartment, suite, unit, or building). - `country: optional string` The country of the address, in ISO 3166-1 alpha-2 format. - `line2: optional string` Secondary address line (e.g., apartment, suite, unit, or building). - `description: optional string` A brief description of the business and its products or services. - `industry: optional object { category, mcc, sector }` - `category: optional string` The general category of the industry. Required if not providing MCC. - `mcc: optional string` The Merchant Category Code (MCC) that best describes the business. Optional. - `sector: optional string` The specific sector within the industry category. Required if not providing MCC. - `legal_name: optional string` The official registered name of the business. - `phone: optional string` The primary contact phone number for the business. - `support_channels: optional object { email, phone, url }` - `email: optional string` The email address for customer support inquiries. - `phone: optional string` The phone number for customer support. - `url: optional string` The URL of the business's customer support page or contact form. - `tax_id: optional string` The business's tax identification number (e.g., EIN in the US). - `use_case: optional string` A description of how the business intends to use Straddle's services. - `capabilities: optional object { consent_types, customer_types, payment_types }` - `consent_types: object { internet, signed_agreement }` - `internet: object { capability_status }` Whether the internet payment authorization capability is enabled for the account. - `capability_status: "active" or "inactive"` - `"active"` - `"inactive"` - `signed_agreement: object { capability_status }` Whether the signed agreement payment authorization capability is enabled for the account. - `capability_status: "active" or "inactive"` - `customer_types: object { businesses, individuals }` - `businesses: object { capability_status }` - `capability_status: "active" or "inactive"` - `individuals: object { capability_status }` - `capability_status: "active" or "inactive"` - `payment_types: object { charges, payouts }` - `charges: object { capability_status }` - `capability_status: "active" or "inactive"` - `payouts: object { capability_status }` - `capability_status: "active" or "inactive"` - `created_at: optional string` Timestamp of when the account was created. - `external_id: optional string` Unique identifier for the account in your database, used for cross-referencing between Straddle and your systems. - `metadata: optional map[string]` Up to 20 additional user-defined key-value pairs. Useful for storing additional information about the account in a structured format. - `settings: optional object { charges, payouts }` - `charges: object { daily_amount, funding_time, linked_bank_account_id, 3 more }` - `daily_amount: number` The maximum dollar amount of charges in a calendar day. - `funding_time: "immediate" or "next_day" or "one_day" or 4 more` The amount of time it takes for a charge to be funded. This value is defined by Straddle. - `"immediate"` - `"next_day"` - `"one_day"` - `"two_day"` - `"three_day"` - `"four_day"` - `"five_day"` - `linked_bank_account_id: string` The unique identifier of the linked bank account associated with charges. This value is defined by Straddle. - `max_amount: number` The maximum amount of a single charge. - `monthly_amount: number` The maximum dollar amount of charges in a calendar month. - `monthly_count: number` The maximum number of charges in a calendar month. - `payouts: object { daily_amount, funding_time, linked_bank_account_id, 3 more }` - `daily_amount: number` The maximum dollar amount of payouts in a day. - `funding_time: "immediate" or "next_day" or "one_day" or 4 more` The amount of time it takes for a payout to be funded. This value is defined by Straddle. - `"immediate"` - `"next_day"` - `"one_day"` - `"two_day"` - `"three_day"` - `"four_day"` - `"five_day"` - `linked_bank_account_id: string` The unique identifier of the linked bank account to use for payouts. - `max_amount: number` The maximum amount of a single payout. - `monthly_amount: number` The maximum dollar amount of payouts in a month. - `monthly_count: number` The maximum number of payouts in a month. - `terms_of_service: optional object { accepted_date, agreement_type, agreement_url, 2 more }` - `accepted_date: string` The datetime of when the terms of service were accepted, in ISO 8601 format. - `agreement_type: "embedded" or "direct"` The type or version of the agreement accepted. Use `embedded` unless your platform was specifically enabled for `direct` agreements. - `"embedded"` - `"direct"` - `agreement_url: string` The URL where the full text of the accepted agreement can be found. - `accepted_ip: optional string` The IP address from which the terms of service were accepted. - `accepted_user_agent: optional string` The user agent string of the browser or application used to accept the terms. - `updated_at: optional string` Timestamp of the most recent update to the account. - `meta: object { api_request_id, api_request_timestamp, max_page_size, 6 more }` Metadata about the API request, including an identifier, timestamp, and pagination details. - `api_request_id: string` Unique identifier for this API request, useful for troubleshooting. - `api_request_timestamp: string` Timestamp for this API request, useful for troubleshooting. - `max_page_size: number` Maximum allowed page size for this endpoint. - `page_number: number` Page number for paginated results. - `page_size: number` Number of items per page in this response. - `sort_by: string` The field that the results were sorted by. - `sort_order: "asc" or "desc"` - `"asc"` - `"desc"` - `total_items: number` Total number of items returned in this response. - `total_pages: number` The number of pages available. - `response_type: "object" or "array" or "error" or "none"` 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. - `"object"` - `"array"` - `"error"` - `"none"` ### Example ```cli straddle embed:accounts list \ --api-key 'My API Key' ``` #### Response ```json { "data": [ { "id": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", "access_level": "standard", "organization_id": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", "status": "created", "status_detail": { "code": "code", "message": "message", "reason": "unverified", "source": "watchtower" }, "type": "business", "business_profile": { "name": "name", "website": "https://example.com", "address": { "address1": "address1", "city": "city", "line1": "line1", "postal_code": "21029-1360", "state": "SE", "zip": "zip", "address2": "address2", "country": "country", "line2": "line2" }, "description": "description", "industry": { "category": "category", "mcc": "mcc", "sector": "sector" }, "legal_name": "legal_name", "phone": "+46991022", "support_channels": { "email": "dev@stainless.com", "phone": "+46991022", "url": "https://example.com" }, "tax_id": "210297980", "use_case": "use_case" }, "capabilities": { "consent_types": { "internet": { "capability_status": "active" }, "signed_agreement": { "capability_status": "active" } }, "customer_types": { "businesses": { "capability_status": "active" }, "individuals": { "capability_status": "active" } }, "payment_types": { "charges": { "capability_status": "active" }, "payouts": { "capability_status": "active" } } }, "created_at": "2019-12-27T18:11:19.117Z", "external_id": "external_id", "metadata": { "foo": "string" }, "settings": { "charges": { "daily_amount": 0, "funding_time": "immediate", "linked_bank_account_id": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", "max_amount": 0, "monthly_amount": 0, "monthly_count": 0 }, "payouts": { "daily_amount": 0, "funding_time": "immediate", "linked_bank_account_id": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", "max_amount": 0, "monthly_amount": 0, "monthly_count": 0 } }, "terms_of_service": { "accepted_date": "2019-12-27T18:11:19.117Z", "agreement_type": "embedded", "agreement_url": "agreement_url", "accepted_ip": "accepted_ip", "accepted_user_agent": "accepted_user_agent" }, "updated_at": "2019-12-27T18:11:19.117Z" } ], "meta": { "api_request_id": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", "api_request_timestamp": "2019-12-27T18:11:19.117Z", "max_page_size": 0, "page_number": 0, "page_size": 0, "sort_by": "sort_by", "sort_order": "asc", "total_items": 0, "total_pages": 0 }, "response_type": "object" } ``` ## Onboard an account `$ straddle embed:accounts onboard` **post** `/v1/accounts/{account_id}/onboard` Initiates the onboarding process for a new account. This endpoint can only be used for accounts where at least one representative and one bank account have already been created. ### Parameters - `--account-id: string` Path param - `--terms-of-service: object { accepted_date, agreement_type, agreement_url, 2 more }` Body param - `--correlation-id: optional string` Header param: Optional client generated identifier to trace and debug a series of requests. - `--idempotency-key: optional string` Header param: Optional client generated value to use for idempotent requests. - `--request-id: optional string` Header param: Optional client generated identifier to trace and debug a request. ### Returns - `accountV1: object { data, meta, response_type }` - `data: object { id, access_level, organization_id, 11 more }` - `id: string` Unique identifier for the account. - `access_level: "standard" or "managed"` The access level granted to the account. This is determined by your platform configuration. Use `standard` unless instructed otherwise by Straddle. - `"standard"` - `"managed"` - `organization_id: string` The unique identifier of the organization this account belongs to. - `status: "created" or "onboarding" or "active" or 2 more` The current status of the account (e.g., 'active', 'inactive', 'pending'). - `"created"` - `"onboarding"` - `"active"` - `"rejected"` - `"inactive"` - `status_detail: object { code, message, reason, source }` - `code: string` A machine-readable code for the specific status, useful for programmatic handling. - `message: string` A human-readable message describing the current status. - `reason: "unverified" or "in_review" or "pending" or 6 more` A machine-readable identifier for the specific status, useful for programmatic handling. - `"unverified"` - `"in_review"` - `"pending"` - `"stuck"` - `"verified"` - `"failed_verification"` - `"disabled"` - `"terminated"` - `"new"` - `source: "watchtower"` Identifies the origin of the status change (e.g., `bank_decline`, `watchtower`). This helps in tracking the cause of status updates. - `"watchtower"` - `type: "business"` The type of account (e.g., 'individual', 'business'). - `"business"` - `business_profile: optional object { name, website, address, 7 more }` - `name: string` The operating or trade name of the business. - `website: string` URL of the business's primary marketing website. - `address: optional object { address1, city, line1, 6 more }` The address object is optional. If provided, it must be a valid address. - `address1: string` Primary address line (e.g., street, PO Box). - `city: string` City, district, suburb, town, or village. - `line1: string` Primary address line (e.g., street, PO Box). - `postal_code: string` Postal or ZIP code. - `state: string` Two-letter state code. - `zip: string` Zip or postal code. - `address2: optional string` Secondary address line (e.g., apartment, suite, unit, or building). - `country: optional string` The country of the address, in ISO 3166-1 alpha-2 format. - `line2: optional string` Secondary address line (e.g., apartment, suite, unit, or building). - `description: optional string` A brief description of the business and its products or services. - `industry: optional object { category, mcc, sector }` - `category: optional string` The general category of the industry. Required if not providing MCC. - `mcc: optional string` The Merchant Category Code (MCC) that best describes the business. Optional. - `sector: optional string` The specific sector within the industry category. Required if not providing MCC. - `legal_name: optional string` The official registered name of the business. - `phone: optional string` The primary contact phone number for the business. - `support_channels: optional object { email, phone, url }` - `email: optional string` The email address for customer support inquiries. - `phone: optional string` The phone number for customer support. - `url: optional string` The URL of the business's customer support page or contact form. - `tax_id: optional string` The business's tax identification number (e.g., EIN in the US). - `use_case: optional string` A description of how the business intends to use Straddle's services. - `capabilities: optional object { consent_types, customer_types, payment_types }` - `consent_types: object { internet, signed_agreement }` - `internet: object { capability_status }` Whether the internet payment authorization capability is enabled for the account. - `capability_status: "active" or "inactive"` - `"active"` - `"inactive"` - `signed_agreement: object { capability_status }` Whether the signed agreement payment authorization capability is enabled for the account. - `capability_status: "active" or "inactive"` - `customer_types: object { businesses, individuals }` - `businesses: object { capability_status }` - `capability_status: "active" or "inactive"` - `individuals: object { capability_status }` - `capability_status: "active" or "inactive"` - `payment_types: object { charges, payouts }` - `charges: object { capability_status }` - `capability_status: "active" or "inactive"` - `payouts: object { capability_status }` - `capability_status: "active" or "inactive"` - `created_at: optional string` Timestamp of when the account was created. - `external_id: optional string` Unique identifier for the account in your database, used for cross-referencing between Straddle and your systems. - `metadata: optional map[string]` Up to 20 additional user-defined key-value pairs. Useful for storing additional information about the account in a structured format. - `settings: optional object { charges, payouts }` - `charges: object { daily_amount, funding_time, linked_bank_account_id, 3 more }` - `daily_amount: number` The maximum dollar amount of charges in a calendar day. - `funding_time: "immediate" or "next_day" or "one_day" or 4 more` The amount of time it takes for a charge to be funded. This value is defined by Straddle. - `"immediate"` - `"next_day"` - `"one_day"` - `"two_day"` - `"three_day"` - `"four_day"` - `"five_day"` - `linked_bank_account_id: string` The unique identifier of the linked bank account associated with charges. This value is defined by Straddle. - `max_amount: number` The maximum amount of a single charge. - `monthly_amount: number` The maximum dollar amount of charges in a calendar month. - `monthly_count: number` The maximum number of charges in a calendar month. - `payouts: object { daily_amount, funding_time, linked_bank_account_id, 3 more }` - `daily_amount: number` The maximum dollar amount of payouts in a day. - `funding_time: "immediate" or "next_day" or "one_day" or 4 more` The amount of time it takes for a payout to be funded. This value is defined by Straddle. - `"immediate"` - `"next_day"` - `"one_day"` - `"two_day"` - `"three_day"` - `"four_day"` - `"five_day"` - `linked_bank_account_id: string` The unique identifier of the linked bank account to use for payouts. - `max_amount: number` The maximum amount of a single payout. - `monthly_amount: number` The maximum dollar amount of payouts in a month. - `monthly_count: number` The maximum number of payouts in a month. - `terms_of_service: optional object { accepted_date, agreement_type, agreement_url, 2 more }` - `accepted_date: string` The datetime of when the terms of service were accepted, in ISO 8601 format. - `agreement_type: "embedded" or "direct"` The type or version of the agreement accepted. Use `embedded` unless your platform was specifically enabled for `direct` agreements. - `"embedded"` - `"direct"` - `agreement_url: string` The URL where the full text of the accepted agreement can be found. - `accepted_ip: optional string` The IP address from which the terms of service were accepted. - `accepted_user_agent: optional string` The user agent string of the browser or application used to accept the terms. - `updated_at: optional string` Timestamp of the most recent update to the account. - `meta: object { api_request_id, api_request_timestamp }` Metadata about the API request, including an identifier and timestamp. - `api_request_id: string` Unique identifier for this API request, useful for troubleshooting. - `api_request_timestamp: string` Timestamp for this API request, useful for troubleshooting. - `response_type: "object" or "array" or "error" or "none"` 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. - `"object"` - `"array"` - `"error"` - `"none"` ### Example ```cli straddle embed:accounts onboard \ --api-key 'My API Key' \ --account-id 182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e \ --terms-of-service "{accepted_date: '2019-12-27T18:11:19.117Z', agreement_type: embedded, agreement_url: agreement_url}" ``` #### Response ```json { "data": { "id": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", "access_level": "standard", "organization_id": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", "status": "created", "status_detail": { "code": "code", "message": "message", "reason": "unverified", "source": "watchtower" }, "type": "business", "business_profile": { "name": "name", "website": "https://example.com", "address": { "address1": "address1", "city": "city", "line1": "line1", "postal_code": "21029-1360", "state": "SE", "zip": "zip", "address2": "address2", "country": "country", "line2": "line2" }, "description": "description", "industry": { "category": "category", "mcc": "mcc", "sector": "sector" }, "legal_name": "legal_name", "phone": "+46991022", "support_channels": { "email": "dev@stainless.com", "phone": "+46991022", "url": "https://example.com" }, "tax_id": "210297980", "use_case": "use_case" }, "capabilities": { "consent_types": { "internet": { "capability_status": "active" }, "signed_agreement": { "capability_status": "active" } }, "customer_types": { "businesses": { "capability_status": "active" }, "individuals": { "capability_status": "active" } }, "payment_types": { "charges": { "capability_status": "active" }, "payouts": { "capability_status": "active" } } }, "created_at": "2019-12-27T18:11:19.117Z", "external_id": "external_id", "metadata": { "foo": "string" }, "settings": { "charges": { "daily_amount": 0, "funding_time": "immediate", "linked_bank_account_id": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", "max_amount": 0, "monthly_amount": 0, "monthly_count": 0 }, "payouts": { "daily_amount": 0, "funding_time": "immediate", "linked_bank_account_id": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", "max_amount": 0, "monthly_amount": 0, "monthly_count": 0 } }, "terms_of_service": { "accepted_date": "2019-12-27T18:11:19.117Z", "agreement_type": "embedded", "agreement_url": "agreement_url", "accepted_ip": "accepted_ip", "accepted_user_agent": "accepted_user_agent" }, "updated_at": "2019-12-27T18:11:19.117Z" }, "meta": { "api_request_id": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", "api_request_timestamp": "2019-12-27T18:11:19.117Z" }, "response_type": "object" } ``` ## Simulate status transitions for a sandbox account `$ straddle embed:accounts simulate` **post** `/v1/accounts/{account_id}/simulate` Simulate the status transitions for sandbox accounts. This endpoint can only be used for sandbox accounts. ### Parameters - `--account-id: string` Path param - `--final-status: optional "onboarding" or "active"` Query param - `--correlation-id: optional string` Header param: Optional client generated identifier to trace and debug a series of requests. - `--idempotency-key: optional string` Header param: Optional client generated value to use for idempotent requests. - `--request-id: optional string` Header param: Optional client generated identifier to trace and debug a request. ### Returns - `accountV1: object { data, meta, response_type }` - `data: object { id, access_level, organization_id, 11 more }` - `id: string` Unique identifier for the account. - `access_level: "standard" or "managed"` The access level granted to the account. This is determined by your platform configuration. Use `standard` unless instructed otherwise by Straddle. - `"standard"` - `"managed"` - `organization_id: string` The unique identifier of the organization this account belongs to. - `status: "created" or "onboarding" or "active" or 2 more` The current status of the account (e.g., 'active', 'inactive', 'pending'). - `"created"` - `"onboarding"` - `"active"` - `"rejected"` - `"inactive"` - `status_detail: object { code, message, reason, source }` - `code: string` A machine-readable code for the specific status, useful for programmatic handling. - `message: string` A human-readable message describing the current status. - `reason: "unverified" or "in_review" or "pending" or 6 more` A machine-readable identifier for the specific status, useful for programmatic handling. - `"unverified"` - `"in_review"` - `"pending"` - `"stuck"` - `"verified"` - `"failed_verification"` - `"disabled"` - `"terminated"` - `"new"` - `source: "watchtower"` Identifies the origin of the status change (e.g., `bank_decline`, `watchtower`). This helps in tracking the cause of status updates. - `"watchtower"` - `type: "business"` The type of account (e.g., 'individual', 'business'). - `"business"` - `business_profile: optional object { name, website, address, 7 more }` - `name: string` The operating or trade name of the business. - `website: string` URL of the business's primary marketing website. - `address: optional object { address1, city, line1, 6 more }` The address object is optional. If provided, it must be a valid address. - `address1: string` Primary address line (e.g., street, PO Box). - `city: string` City, district, suburb, town, or village. - `line1: string` Primary address line (e.g., street, PO Box). - `postal_code: string` Postal or ZIP code. - `state: string` Two-letter state code. - `zip: string` Zip or postal code. - `address2: optional string` Secondary address line (e.g., apartment, suite, unit, or building). - `country: optional string` The country of the address, in ISO 3166-1 alpha-2 format. - `line2: optional string` Secondary address line (e.g., apartment, suite, unit, or building). - `description: optional string` A brief description of the business and its products or services. - `industry: optional object { category, mcc, sector }` - `category: optional string` The general category of the industry. Required if not providing MCC. - `mcc: optional string` The Merchant Category Code (MCC) that best describes the business. Optional. - `sector: optional string` The specific sector within the industry category. Required if not providing MCC. - `legal_name: optional string` The official registered name of the business. - `phone: optional string` The primary contact phone number for the business. - `support_channels: optional object { email, phone, url }` - `email: optional string` The email address for customer support inquiries. - `phone: optional string` The phone number for customer support. - `url: optional string` The URL of the business's customer support page or contact form. - `tax_id: optional string` The business's tax identification number (e.g., EIN in the US). - `use_case: optional string` A description of how the business intends to use Straddle's services. - `capabilities: optional object { consent_types, customer_types, payment_types }` - `consent_types: object { internet, signed_agreement }` - `internet: object { capability_status }` Whether the internet payment authorization capability is enabled for the account. - `capability_status: "active" or "inactive"` - `"active"` - `"inactive"` - `signed_agreement: object { capability_status }` Whether the signed agreement payment authorization capability is enabled for the account. - `capability_status: "active" or "inactive"` - `customer_types: object { businesses, individuals }` - `businesses: object { capability_status }` - `capability_status: "active" or "inactive"` - `individuals: object { capability_status }` - `capability_status: "active" or "inactive"` - `payment_types: object { charges, payouts }` - `charges: object { capability_status }` - `capability_status: "active" or "inactive"` - `payouts: object { capability_status }` - `capability_status: "active" or "inactive"` - `created_at: optional string` Timestamp of when the account was created. - `external_id: optional string` Unique identifier for the account in your database, used for cross-referencing between Straddle and your systems. - `metadata: optional map[string]` Up to 20 additional user-defined key-value pairs. Useful for storing additional information about the account in a structured format. - `settings: optional object { charges, payouts }` - `charges: object { daily_amount, funding_time, linked_bank_account_id, 3 more }` - `daily_amount: number` The maximum dollar amount of charges in a calendar day. - `funding_time: "immediate" or "next_day" or "one_day" or 4 more` The amount of time it takes for a charge to be funded. This value is defined by Straddle. - `"immediate"` - `"next_day"` - `"one_day"` - `"two_day"` - `"three_day"` - `"four_day"` - `"five_day"` - `linked_bank_account_id: string` The unique identifier of the linked bank account associated with charges. This value is defined by Straddle. - `max_amount: number` The maximum amount of a single charge. - `monthly_amount: number` The maximum dollar amount of charges in a calendar month. - `monthly_count: number` The maximum number of charges in a calendar month. - `payouts: object { daily_amount, funding_time, linked_bank_account_id, 3 more }` - `daily_amount: number` The maximum dollar amount of payouts in a day. - `funding_time: "immediate" or "next_day" or "one_day" or 4 more` The amount of time it takes for a payout to be funded. This value is defined by Straddle. - `"immediate"` - `"next_day"` - `"one_day"` - `"two_day"` - `"three_day"` - `"four_day"` - `"five_day"` - `linked_bank_account_id: string` The unique identifier of the linked bank account to use for payouts. - `max_amount: number` The maximum amount of a single payout. - `monthly_amount: number` The maximum dollar amount of payouts in a month. - `monthly_count: number` The maximum number of payouts in a month. - `terms_of_service: optional object { accepted_date, agreement_type, agreement_url, 2 more }` - `accepted_date: string` The datetime of when the terms of service were accepted, in ISO 8601 format. - `agreement_type: "embedded" or "direct"` The type or version of the agreement accepted. Use `embedded` unless your platform was specifically enabled for `direct` agreements. - `"embedded"` - `"direct"` - `agreement_url: string` The URL where the full text of the accepted agreement can be found. - `accepted_ip: optional string` The IP address from which the terms of service were accepted. - `accepted_user_agent: optional string` The user agent string of the browser or application used to accept the terms. - `updated_at: optional string` Timestamp of the most recent update to the account. - `meta: object { api_request_id, api_request_timestamp }` Metadata about the API request, including an identifier and timestamp. - `api_request_id: string` Unique identifier for this API request, useful for troubleshooting. - `api_request_timestamp: string` Timestamp for this API request, useful for troubleshooting. - `response_type: "object" or "array" or "error" or "none"` 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. - `"object"` - `"array"` - `"error"` - `"none"` ### Example ```cli straddle embed:accounts simulate \ --api-key 'My API Key' \ --account-id 182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e ``` #### Response ```json { "data": { "id": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", "access_level": "standard", "organization_id": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", "status": "created", "status_detail": { "code": "code", "message": "message", "reason": "unverified", "source": "watchtower" }, "type": "business", "business_profile": { "name": "name", "website": "https://example.com", "address": { "address1": "address1", "city": "city", "line1": "line1", "postal_code": "21029-1360", "state": "SE", "zip": "zip", "address2": "address2", "country": "country", "line2": "line2" }, "description": "description", "industry": { "category": "category", "mcc": "mcc", "sector": "sector" }, "legal_name": "legal_name", "phone": "+46991022", "support_channels": { "email": "dev@stainless.com", "phone": "+46991022", "url": "https://example.com" }, "tax_id": "210297980", "use_case": "use_case" }, "capabilities": { "consent_types": { "internet": { "capability_status": "active" }, "signed_agreement": { "capability_status": "active" } }, "customer_types": { "businesses": { "capability_status": "active" }, "individuals": { "capability_status": "active" } }, "payment_types": { "charges": { "capability_status": "active" }, "payouts": { "capability_status": "active" } } }, "created_at": "2019-12-27T18:11:19.117Z", "external_id": "external_id", "metadata": { "foo": "string" }, "settings": { "charges": { "daily_amount": 0, "funding_time": "immediate", "linked_bank_account_id": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", "max_amount": 0, "monthly_amount": 0, "monthly_count": 0 }, "payouts": { "daily_amount": 0, "funding_time": "immediate", "linked_bank_account_id": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", "max_amount": 0, "monthly_amount": 0, "monthly_count": 0 } }, "terms_of_service": { "accepted_date": "2019-12-27T18:11:19.117Z", "agreement_type": "embedded", "agreement_url": "agreement_url", "accepted_ip": "accepted_ip", "accepted_user_agent": "accepted_user_agent" }, "updated_at": "2019-12-27T18:11:19.117Z" }, "meta": { "api_request_id": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", "api_request_timestamp": "2019-12-27T18:11:19.117Z" }, "response_type": "object" } ``` ## Domain Types ### Account Paged V1 - `accountPagedV1: object { data, meta, response_type }` - `data: array of object { id, access_level, organization_id, 11 more }` - `id: string` Unique identifier for the account. - `access_level: "standard" or "managed"` The access level granted to the account. This is determined by your platform configuration. Use `standard` unless instructed otherwise by Straddle. - `"standard"` - `"managed"` - `organization_id: string` The unique identifier of the organization this account belongs to. - `status: "created" or "onboarding" or "active" or 2 more` The current status of the account (e.g., 'active', 'inactive', 'pending'). - `"created"` - `"onboarding"` - `"active"` - `"rejected"` - `"inactive"` - `status_detail: object { code, message, reason, source }` - `code: string` A machine-readable code for the specific status, useful for programmatic handling. - `message: string` A human-readable message describing the current status. - `reason: "unverified" or "in_review" or "pending" or 6 more` A machine-readable identifier for the specific status, useful for programmatic handling. - `"unverified"` - `"in_review"` - `"pending"` - `"stuck"` - `"verified"` - `"failed_verification"` - `"disabled"` - `"terminated"` - `"new"` - `source: "watchtower"` Identifies the origin of the status change (e.g., `bank_decline`, `watchtower`). This helps in tracking the cause of status updates. - `"watchtower"` - `type: "business"` The type of account (e.g., 'individual', 'business'). - `"business"` - `business_profile: optional object { name, website, address, 7 more }` - `name: string` The operating or trade name of the business. - `website: string` URL of the business's primary marketing website. - `address: optional object { address1, city, line1, 6 more }` The address object is optional. If provided, it must be a valid address. - `address1: string` Primary address line (e.g., street, PO Box). - `city: string` City, district, suburb, town, or village. - `line1: string` Primary address line (e.g., street, PO Box). - `postal_code: string` Postal or ZIP code. - `state: string` Two-letter state code. - `zip: string` Zip or postal code. - `address2: optional string` Secondary address line (e.g., apartment, suite, unit, or building). - `country: optional string` The country of the address, in ISO 3166-1 alpha-2 format. - `line2: optional string` Secondary address line (e.g., apartment, suite, unit, or building). - `description: optional string` A brief description of the business and its products or services. - `industry: optional object { category, mcc, sector }` - `category: optional string` The general category of the industry. Required if not providing MCC. - `mcc: optional string` The Merchant Category Code (MCC) that best describes the business. Optional. - `sector: optional string` The specific sector within the industry category. Required if not providing MCC. - `legal_name: optional string` The official registered name of the business. - `phone: optional string` The primary contact phone number for the business. - `support_channels: optional object { email, phone, url }` - `email: optional string` The email address for customer support inquiries. - `phone: optional string` The phone number for customer support. - `url: optional string` The URL of the business's customer support page or contact form. - `tax_id: optional string` The business's tax identification number (e.g., EIN in the US). - `use_case: optional string` A description of how the business intends to use Straddle's services. - `capabilities: optional object { consent_types, customer_types, payment_types }` - `consent_types: object { internet, signed_agreement }` - `internet: object { capability_status }` Whether the internet payment authorization capability is enabled for the account. - `capability_status: "active" or "inactive"` - `"active"` - `"inactive"` - `signed_agreement: object { capability_status }` Whether the signed agreement payment authorization capability is enabled for the account. - `capability_status: "active" or "inactive"` - `customer_types: object { businesses, individuals }` - `businesses: object { capability_status }` - `capability_status: "active" or "inactive"` - `individuals: object { capability_status }` - `capability_status: "active" or "inactive"` - `payment_types: object { charges, payouts }` - `charges: object { capability_status }` - `capability_status: "active" or "inactive"` - `payouts: object { capability_status }` - `capability_status: "active" or "inactive"` - `created_at: optional string` Timestamp of when the account was created. - `external_id: optional string` Unique identifier for the account in your database, used for cross-referencing between Straddle and your systems. - `metadata: optional map[string]` Up to 20 additional user-defined key-value pairs. Useful for storing additional information about the account in a structured format. - `settings: optional object { charges, payouts }` - `charges: object { daily_amount, funding_time, linked_bank_account_id, 3 more }` - `daily_amount: number` The maximum dollar amount of charges in a calendar day. - `funding_time: "immediate" or "next_day" or "one_day" or 4 more` The amount of time it takes for a charge to be funded. This value is defined by Straddle. - `"immediate"` - `"next_day"` - `"one_day"` - `"two_day"` - `"three_day"` - `"four_day"` - `"five_day"` - `linked_bank_account_id: string` The unique identifier of the linked bank account associated with charges. This value is defined by Straddle. - `max_amount: number` The maximum amount of a single charge. - `monthly_amount: number` The maximum dollar amount of charges in a calendar month. - `monthly_count: number` The maximum number of charges in a calendar month. - `payouts: object { daily_amount, funding_time, linked_bank_account_id, 3 more }` - `daily_amount: number` The maximum dollar amount of payouts in a day. - `funding_time: "immediate" or "next_day" or "one_day" or 4 more` The amount of time it takes for a payout to be funded. This value is defined by Straddle. - `"immediate"` - `"next_day"` - `"one_day"` - `"two_day"` - `"three_day"` - `"four_day"` - `"five_day"` - `linked_bank_account_id: string` The unique identifier of the linked bank account to use for payouts. - `max_amount: number` The maximum amount of a single payout. - `monthly_amount: number` The maximum dollar amount of payouts in a month. - `monthly_count: number` The maximum number of payouts in a month. - `terms_of_service: optional object { accepted_date, agreement_type, agreement_url, 2 more }` - `accepted_date: string` The datetime of when the terms of service were accepted, in ISO 8601 format. - `agreement_type: "embedded" or "direct"` The type or version of the agreement accepted. Use `embedded` unless your platform was specifically enabled for `direct` agreements. - `"embedded"` - `"direct"` - `agreement_url: string` The URL where the full text of the accepted agreement can be found. - `accepted_ip: optional string` The IP address from which the terms of service were accepted. - `accepted_user_agent: optional string` The user agent string of the browser or application used to accept the terms. - `updated_at: optional string` Timestamp of the most recent update to the account. - `meta: object { api_request_id, api_request_timestamp, max_page_size, 6 more }` Metadata about the API request, including an identifier, timestamp, and pagination details. - `api_request_id: string` Unique identifier for this API request, useful for troubleshooting. - `api_request_timestamp: string` Timestamp for this API request, useful for troubleshooting. - `max_page_size: number` Maximum allowed page size for this endpoint. - `page_number: number` Page number for paginated results. - `page_size: number` Number of items per page in this response. - `sort_by: string` The field that the results were sorted by. - `sort_order: "asc" or "desc"` - `"asc"` - `"desc"` - `total_items: number` Total number of items returned in this response. - `total_pages: number` The number of pages available. - `response_type: "object" or "array" or "error" or "none"` 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. - `"object"` - `"array"` - `"error"` - `"none"` ### Account V1 - `accountV1: object { data, meta, response_type }` - `data: object { id, access_level, organization_id, 11 more }` - `id: string` Unique identifier for the account. - `access_level: "standard" or "managed"` The access level granted to the account. This is determined by your platform configuration. Use `standard` unless instructed otherwise by Straddle. - `"standard"` - `"managed"` - `organization_id: string` The unique identifier of the organization this account belongs to. - `status: "created" or "onboarding" or "active" or 2 more` The current status of the account (e.g., 'active', 'inactive', 'pending'). - `"created"` - `"onboarding"` - `"active"` - `"rejected"` - `"inactive"` - `status_detail: object { code, message, reason, source }` - `code: string` A machine-readable code for the specific status, useful for programmatic handling. - `message: string` A human-readable message describing the current status. - `reason: "unverified" or "in_review" or "pending" or 6 more` A machine-readable identifier for the specific status, useful for programmatic handling. - `"unverified"` - `"in_review"` - `"pending"` - `"stuck"` - `"verified"` - `"failed_verification"` - `"disabled"` - `"terminated"` - `"new"` - `source: "watchtower"` Identifies the origin of the status change (e.g., `bank_decline`, `watchtower`). This helps in tracking the cause of status updates. - `"watchtower"` - `type: "business"` The type of account (e.g., 'individual', 'business'). - `"business"` - `business_profile: optional object { name, website, address, 7 more }` - `name: string` The operating or trade name of the business. - `website: string` URL of the business's primary marketing website. - `address: optional object { address1, city, line1, 6 more }` The address object is optional. If provided, it must be a valid address. - `address1: string` Primary address line (e.g., street, PO Box). - `city: string` City, district, suburb, town, or village. - `line1: string` Primary address line (e.g., street, PO Box). - `postal_code: string` Postal or ZIP code. - `state: string` Two-letter state code. - `zip: string` Zip or postal code. - `address2: optional string` Secondary address line (e.g., apartment, suite, unit, or building). - `country: optional string` The country of the address, in ISO 3166-1 alpha-2 format. - `line2: optional string` Secondary address line (e.g., apartment, suite, unit, or building). - `description: optional string` A brief description of the business and its products or services. - `industry: optional object { category, mcc, sector }` - `category: optional string` The general category of the industry. Required if not providing MCC. - `mcc: optional string` The Merchant Category Code (MCC) that best describes the business. Optional. - `sector: optional string` The specific sector within the industry category. Required if not providing MCC. - `legal_name: optional string` The official registered name of the business. - `phone: optional string` The primary contact phone number for the business. - `support_channels: optional object { email, phone, url }` - `email: optional string` The email address for customer support inquiries. - `phone: optional string` The phone number for customer support. - `url: optional string` The URL of the business's customer support page or contact form. - `tax_id: optional string` The business's tax identification number (e.g., EIN in the US). - `use_case: optional string` A description of how the business intends to use Straddle's services. - `capabilities: optional object { consent_types, customer_types, payment_types }` - `consent_types: object { internet, signed_agreement }` - `internet: object { capability_status }` Whether the internet payment authorization capability is enabled for the account. - `capability_status: "active" or "inactive"` - `"active"` - `"inactive"` - `signed_agreement: object { capability_status }` Whether the signed agreement payment authorization capability is enabled for the account. - `capability_status: "active" or "inactive"` - `customer_types: object { businesses, individuals }` - `businesses: object { capability_status }` - `capability_status: "active" or "inactive"` - `individuals: object { capability_status }` - `capability_status: "active" or "inactive"` - `payment_types: object { charges, payouts }` - `charges: object { capability_status }` - `capability_status: "active" or "inactive"` - `payouts: object { capability_status }` - `capability_status: "active" or "inactive"` - `created_at: optional string` Timestamp of when the account was created. - `external_id: optional string` Unique identifier for the account in your database, used for cross-referencing between Straddle and your systems. - `metadata: optional map[string]` Up to 20 additional user-defined key-value pairs. Useful for storing additional information about the account in a structured format. - `settings: optional object { charges, payouts }` - `charges: object { daily_amount, funding_time, linked_bank_account_id, 3 more }` - `daily_amount: number` The maximum dollar amount of charges in a calendar day. - `funding_time: "immediate" or "next_day" or "one_day" or 4 more` The amount of time it takes for a charge to be funded. This value is defined by Straddle. - `"immediate"` - `"next_day"` - `"one_day"` - `"two_day"` - `"three_day"` - `"four_day"` - `"five_day"` - `linked_bank_account_id: string` The unique identifier of the linked bank account associated with charges. This value is defined by Straddle. - `max_amount: number` The maximum amount of a single charge. - `monthly_amount: number` The maximum dollar amount of charges in a calendar month. - `monthly_count: number` The maximum number of charges in a calendar month. - `payouts: object { daily_amount, funding_time, linked_bank_account_id, 3 more }` - `daily_amount: number` The maximum dollar amount of payouts in a day. - `funding_time: "immediate" or "next_day" or "one_day" or 4 more` The amount of time it takes for a payout to be funded. This value is defined by Straddle. - `"immediate"` - `"next_day"` - `"one_day"` - `"two_day"` - `"three_day"` - `"four_day"` - `"five_day"` - `linked_bank_account_id: string` The unique identifier of the linked bank account to use for payouts. - `max_amount: number` The maximum amount of a single payout. - `monthly_amount: number` The maximum dollar amount of payouts in a month. - `monthly_count: number` The maximum number of payouts in a month. - `terms_of_service: optional object { accepted_date, agreement_type, agreement_url, 2 more }` - `accepted_date: string` The datetime of when the terms of service were accepted, in ISO 8601 format. - `agreement_type: "embedded" or "direct"` The type or version of the agreement accepted. Use `embedded` unless your platform was specifically enabled for `direct` agreements. - `"embedded"` - `"direct"` - `agreement_url: string` The URL where the full text of the accepted agreement can be found. - `accepted_ip: optional string` The IP address from which the terms of service were accepted. - `accepted_user_agent: optional string` The user agent string of the browser or application used to accept the terms. - `updated_at: optional string` Timestamp of the most recent update to the account. - `meta: object { api_request_id, api_request_timestamp }` Metadata about the API request, including an identifier and timestamp. - `api_request_id: string` Unique identifier for this API request, useful for troubleshooting. - `api_request_timestamp: string` Timestamp for this API request, useful for troubleshooting. - `response_type: "object" or "array" or "error" or "none"` 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. - `"object"` - `"array"` - `"error"` - `"none"` ### Address V1 - `addressV1: object { address1, city, line1, 6 more }` The address object is optional. If provided, it must be a valid address. - `address1: string` Primary address line (e.g., street, PO Box). - `city: string` City, district, suburb, town, or village. - `line1: string` Primary address line (e.g., street, PO Box). - `postal_code: string` Postal or ZIP code. - `state: string` Two-letter state code. - `zip: string` Zip or postal code. - `address2: optional string` Secondary address line (e.g., apartment, suite, unit, or building). - `country: optional string` The country of the address, in ISO 3166-1 alpha-2 format. - `line2: optional string` Secondary address line (e.g., apartment, suite, unit, or building). ### Business Profile V1 - `businessProfileV1: object { name, website, address, 7 more }` - `name: string` The operating or trade name of the business. - `website: string` URL of the business's primary marketing website. - `address: optional object { address1, city, line1, 6 more }` The address object is optional. If provided, it must be a valid address. - `address1: string` Primary address line (e.g., street, PO Box). - `city: string` City, district, suburb, town, or village. - `line1: string` Primary address line (e.g., street, PO Box). - `postal_code: string` Postal or ZIP code. - `state: string` Two-letter state code. - `zip: string` Zip or postal code. - `address2: optional string` Secondary address line (e.g., apartment, suite, unit, or building). - `country: optional string` The country of the address, in ISO 3166-1 alpha-2 format. - `line2: optional string` Secondary address line (e.g., apartment, suite, unit, or building). - `description: optional string` A brief description of the business and its products or services. - `industry: optional object { category, mcc, sector }` - `category: optional string` The general category of the industry. Required if not providing MCC. - `mcc: optional string` The Merchant Category Code (MCC) that best describes the business. Optional. - `sector: optional string` The specific sector within the industry category. Required if not providing MCC. - `legal_name: optional string` The official registered name of the business. - `phone: optional string` The primary contact phone number for the business. - `support_channels: optional object { email, phone, url }` - `email: optional string` The email address for customer support inquiries. - `phone: optional string` The phone number for customer support. - `url: optional string` The URL of the business's customer support page or contact form. - `tax_id: optional string` The business's tax identification number (e.g., EIN in the US). - `use_case: optional string` A description of how the business intends to use Straddle's services. ### Capability V1 - `capabilityV1: object { capability_status }` - `capability_status: "active" or "inactive"` - `"active"` - `"inactive"` ### Industry V1 - `industryV1: object { category, mcc, sector }` - `category: optional string` The general category of the industry. Required if not providing MCC. - `mcc: optional string` The Merchant Category Code (MCC) that best describes the business. Optional. - `sector: optional string` The specific sector within the industry category. Required if not providing MCC. ### Support Channels V1 - `supportChannelsV1: object { email, phone, url }` - `email: optional string` The email address for customer support inquiries. - `phone: optional string` The phone number for customer support. - `url: optional string` The URL of the business's customer support page or contact form. ### Terms Of Service V1 - `termsOfServiceV1: object { accepted_date, agreement_type, agreement_url, 2 more }` - `accepted_date: string` The datetime of when the terms of service were accepted, in ISO 8601 format. - `agreement_type: "embedded" or "direct"` The type or version of the agreement accepted. Use `embedded` unless your platform was specifically enabled for `direct` agreements. - `"embedded"` - `"direct"` - `agreement_url: string` The URL where the full text of the accepted agreement can be found. - `accepted_ip: optional string` The IP address from which the terms of service were accepted. - `accepted_user_agent: optional string` The user agent string of the browser or application used to accept the terms. # Capability Requests ## Request a capability `$ straddle embed:accounts:capability-requests create` **post** `/v1/accounts/{account_id}/capability_requests` Submits a request to enable a specific capability for an account. Use this endpoint to request additional features or services for an account. ### Parameters - `--account-id: string` Path param - `--businesses: optional object { enable }` Body param: Allows the account to accept payments from businesses. - `--charges: optional object { daily_amount, enable, max_amount, 2 more }` Body param: The charges capability settings for the account. - `--individuals: optional object { enable }` Body param: Allows the account to accept payments from individuals. - `--internet: optional object { enable }` Body param: Allows the account to accept payments authorized via the internet or mobile applications. - `--payouts: optional object { daily_amount, enable, max_amount, 2 more }` Body param: The payouts capability settings for the account. - `--signed-agreement: optional object { enable }` Body param: Allows the account to accept payments authorized by signed agreements or contracts. - `--correlation-id: optional string` Header param: Optional client generated identifier to trace and debug a series of requests. - `--idempotency-key: optional string` Header param: Optional client generated value to use for idempotent requests. - `--request-id: optional string` Header param: Optional client generated identifier to trace and debug a request. ### Returns - `capabilityRequestPagedV1: object { data, meta, response_type }` - `data: array of object { id, account_id, category, 6 more }` - `id: string` Unique identifier for the capability request. - `account_id: string` The unique identifier of the account associated with this capability request. - `category: "payment_type" or "customer_type" or "consent_type"` The category of the requested capability. Use `payment_type` for charges and payouts, `customer_type` to define `individuals` or `businesses`, and `consent_type` for `signed_agreement` or `internet` payment authorization. - `"payment_type"` - `"customer_type"` - `"consent_type"` - `created_at: string` Timestamp of when the capability request was created. - `enable: boolean` Whether this capability request is to enable or disable the capability. - `status: "active" or "inactive" or "in_review" or 3 more` The current status of the capability request. - `"active"` - `"inactive"` - `"in_review"` - `"rejected"` - `"approved"` - `"reviewing"` - `type: "charges" or "payouts" or "individuals" or 3 more` The specific type of capability being requested within the category. - `"charges"` - `"payouts"` - `"individuals"` - `"businesses"` - `"signed_agreement"` - `"internet"` - `updated_at: string` Timestamp of the most recent update to the capability request. - `settings: optional map[unknown]` Any specific settings or configurations related to the requested capability. - `meta: object { api_request_id, api_request_timestamp, max_page_size, 6 more }` Metadata about the API request, including an identifier, timestamp, and pagination details. - `api_request_id: string` Unique identifier for this API request, useful for troubleshooting. - `api_request_timestamp: string` Timestamp for this API request, useful for troubleshooting. - `max_page_size: number` Maximum allowed page size for this endpoint. - `page_number: number` Page number for paginated results. - `page_size: number` Number of items per page in this response. - `sort_by: string` The field that the results were sorted by. - `sort_order: "asc" or "desc"` - `"asc"` - `"desc"` - `total_items: number` Total number of items returned in this response. - `total_pages: number` The number of pages available. - `response_type: "object" or "array" or "error" or "none"` 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. - `"object"` - `"array"` - `"error"` - `"none"` ### Example ```cli straddle embed:accounts:capability-requests create \ --api-key 'My API Key' \ --account-id 182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e ``` #### Response ```json { "data": [ { "id": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", "account_id": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", "category": "payment_type", "created_at": "2019-12-27T18:11:19.117Z", "enable": true, "status": "active", "type": "charges", "updated_at": "2019-12-27T18:11:19.117Z", "settings": { "foo": "bar" } } ], "meta": { "api_request_id": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", "api_request_timestamp": "2019-12-27T18:11:19.117Z", "max_page_size": 0, "page_number": 0, "page_size": 0, "sort_by": "sort_by", "sort_order": "asc", "total_items": 0, "total_pages": 0 }, "response_type": "object" } ``` ## List capability requests `$ straddle embed:accounts:capability-requests list` **get** `/v1/accounts/{account_id}/capability_requests` Retrieves a list of capability requests associated with an account. The requests are returned sorted by creation date, with the most recent requests appearing first. This endpoint supports advanced sorting and filtering options. ### Parameters - `--account-id: string` Path param - `--category: optional "payment_type" or "customer_type" or "consent_type"` Query param: Filter capability requests by category. - `--page-number: optional number` Query param: Results page number. Starts at page 1. - `--page-size: optional number` Query param: Page size.Max value: 1000 - `--sort-by: optional string` Query param: Sort By. - `--sort-order: optional "asc" or "desc"` Query param: Sort Order. - `--status: optional "active" or "inactive" or "in_review" or "rejected"` Query param: Filter capability requests by their current status. - `--type: optional "charges" or "payouts" or "individuals" or 3 more` Query param: Filter capability requests by the specific type of capability. - `--correlation-id: optional string` Header param: Optional client generated identifier to trace and debug a series of requests. - `--request-id: optional string` Header param: Optional client generated identifier to trace and debug a request. ### Returns - `capabilityRequestPagedV1: object { data, meta, response_type }` - `data: array of object { id, account_id, category, 6 more }` - `id: string` Unique identifier for the capability request. - `account_id: string` The unique identifier of the account associated with this capability request. - `category: "payment_type" or "customer_type" or "consent_type"` The category of the requested capability. Use `payment_type` for charges and payouts, `customer_type` to define `individuals` or `businesses`, and `consent_type` for `signed_agreement` or `internet` payment authorization. - `"payment_type"` - `"customer_type"` - `"consent_type"` - `created_at: string` Timestamp of when the capability request was created. - `enable: boolean` Whether this capability request is to enable or disable the capability. - `status: "active" or "inactive" or "in_review" or 3 more` The current status of the capability request. - `"active"` - `"inactive"` - `"in_review"` - `"rejected"` - `"approved"` - `"reviewing"` - `type: "charges" or "payouts" or "individuals" or 3 more` The specific type of capability being requested within the category. - `"charges"` - `"payouts"` - `"individuals"` - `"businesses"` - `"signed_agreement"` - `"internet"` - `updated_at: string` Timestamp of the most recent update to the capability request. - `settings: optional map[unknown]` Any specific settings or configurations related to the requested capability. - `meta: object { api_request_id, api_request_timestamp, max_page_size, 6 more }` Metadata about the API request, including an identifier, timestamp, and pagination details. - `api_request_id: string` Unique identifier for this API request, useful for troubleshooting. - `api_request_timestamp: string` Timestamp for this API request, useful for troubleshooting. - `max_page_size: number` Maximum allowed page size for this endpoint. - `page_number: number` Page number for paginated results. - `page_size: number` Number of items per page in this response. - `sort_by: string` The field that the results were sorted by. - `sort_order: "asc" or "desc"` - `"asc"` - `"desc"` - `total_items: number` Total number of items returned in this response. - `total_pages: number` The number of pages available. - `response_type: "object" or "array" or "error" or "none"` 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. - `"object"` - `"array"` - `"error"` - `"none"` ### Example ```cli straddle embed:accounts:capability-requests list \ --api-key 'My API Key' \ --account-id 182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e ``` #### Response ```json { "data": [ { "id": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", "account_id": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", "category": "payment_type", "created_at": "2019-12-27T18:11:19.117Z", "enable": true, "status": "active", "type": "charges", "updated_at": "2019-12-27T18:11:19.117Z", "settings": { "foo": "bar" } } ], "meta": { "api_request_id": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", "api_request_timestamp": "2019-12-27T18:11:19.117Z", "max_page_size": 0, "page_number": 0, "page_size": 0, "sort_by": "sort_by", "sort_order": "asc", "total_items": 0, "total_pages": 0 }, "response_type": "object" } ``` ## Domain Types ### Capability Request Paged V1 - `capabilityRequestPagedV1: object { data, meta, response_type }` - `data: array of object { id, account_id, category, 6 more }` - `id: string` Unique identifier for the capability request. - `account_id: string` The unique identifier of the account associated with this capability request. - `category: "payment_type" or "customer_type" or "consent_type"` The category of the requested capability. Use `payment_type` for charges and payouts, `customer_type` to define `individuals` or `businesses`, and `consent_type` for `signed_agreement` or `internet` payment authorization. - `"payment_type"` - `"customer_type"` - `"consent_type"` - `created_at: string` Timestamp of when the capability request was created. - `enable: boolean` Whether this capability request is to enable or disable the capability. - `status: "active" or "inactive" or "in_review" or 3 more` The current status of the capability request. - `"active"` - `"inactive"` - `"in_review"` - `"rejected"` - `"approved"` - `"reviewing"` - `type: "charges" or "payouts" or "individuals" or 3 more` The specific type of capability being requested within the category. - `"charges"` - `"payouts"` - `"individuals"` - `"businesses"` - `"signed_agreement"` - `"internet"` - `updated_at: string` Timestamp of the most recent update to the capability request. - `settings: optional map[unknown]` Any specific settings or configurations related to the requested capability. - `meta: object { api_request_id, api_request_timestamp, max_page_size, 6 more }` Metadata about the API request, including an identifier, timestamp, and pagination details. - `api_request_id: string` Unique identifier for this API request, useful for troubleshooting. - `api_request_timestamp: string` Timestamp for this API request, useful for troubleshooting. - `max_page_size: number` Maximum allowed page size for this endpoint. - `page_number: number` Page number for paginated results. - `page_size: number` Number of items per page in this response. - `sort_by: string` The field that the results were sorted by. - `sort_order: "asc" or "desc"` - `"asc"` - `"desc"` - `total_items: number` Total number of items returned in this response. - `total_pages: number` The number of pages available. - `response_type: "object" or "array" or "error" or "none"` 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. - `"object"` - `"array"` - `"error"` - `"none"` # Linked Bank Accounts ## Create a linked bank account `$ straddle embed:linked-bank-accounts create` **post** `/v1/linked_bank_accounts` Creates a new linked bank account associated with a Straddle account. This endpoint allows you to associate external bank accounts with a Straddle account for various payment operations such as payment deposits, payout withdrawals, and more. ### Parameters - `--account-id: string` Body param: The unique identifier of the Straddle account to associate this bank account with. - `--bank-account: object { account_holder, account_number, routing_number }` Body param - `--description: optional string` Body param: Optional description for the bank account. - `--metadata: optional map[string]` Body param: Up to 20 additional user-defined key-value pairs. Useful for storing additional information about the linked bank account in a structured format. - `--platform-id: optional string` Body param: The unique identifier of the Straddle Platform to associate this bank account with. - `--purpose: optional array of "charges" or "payouts" or "billing"` Body param: The purposes for the linked bank account. - `--correlation-id: optional string` Header param: Optional client generated identifier to trace and debug a series of requests. - `--idempotency-key: optional string` Header param: Optional client generated value to use for idempotent requests. - `--request-id: optional string` Header param: Optional client generated identifier to trace and debug a request. ### Returns - `linkedBankAccountV1: object { data, meta, response_type }` - `data: object { id, account_id, bank_account, 8 more }` - `id: string` Unique identifier for the linked bank account. - `account_id: string` The unique identifier of the Straddle account related to this bank account. - `bank_account: object { account_holder, account_mask, institution_name, routing_number }` - `account_holder: string` - `account_mask: string` - `institution_name: string` - `routing_number: string` - `created_at: string` Timestamp of when the bank account object was created. - `purposes: array of "charges" or "payouts" or "billing"` The purposes for the linked bank account. - `"charges"` - `"payouts"` - `"billing"` - `status: "created" or "onboarding" or "active" or 3 more` The current status of the linked bank account. - `"created"` - `"onboarding"` - `"active"` - `"rejected"` - `"inactive"` - `"canceled"` - `status_detail: object { code, message, reason, source }` - `code: string` A machine-readable code for the specific status, useful for programmatic handling. - `message: string` A human-readable message describing the current status. - `reason: "unverified" or "in_review" or "pending" or 5 more` A machine-readable identifier for the specific status, useful for programmatic handling. - `"unverified"` - `"in_review"` - `"pending"` - `"stuck"` - `"verified"` - `"failed_verification"` - `"disabled"` - `"new"` - `source: "watchtower"` Identifies the origin of the status change (e.g., `watchtower`). This helps in tracking the cause of status updates. - `"watchtower"` - `updated_at: string` Timestamp of the most recent update to the linked bank account. - `description: optional string` Optional description for the bank account. - `metadata: optional map[string]` Up to 20 additional user-defined key-value pairs. Useful for storing additional information about the linked bank account in a structured format. - `platform_id: optional string` The unique identifier of the Straddle Platform relatd to this bank account. - `meta: object { api_request_id, api_request_timestamp }` Metadata about the API request, including an identifier and timestamp. - `api_request_id: string` Unique identifier for this API request, useful for troubleshooting. - `api_request_timestamp: string` Timestamp for this API request, useful for troubleshooting. - `response_type: "object" or "array" or "error" or "none"` 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. - `"object"` - `"array"` - `"error"` - `"none"` ### Example ```cli straddle embed:linked-bank-accounts create \ --api-key 'My API Key' \ --account-id 182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e \ --bank-account '{account_holder: account_holder, account_number: account_number, routing_number: xxxxxxxxx}' ``` #### Response ```json { "data": { "id": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", "account_id": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", "bank_account": { "account_holder": "account_holder", "account_mask": "account_mask", "institution_name": "institution_name", "routing_number": "routing_number" }, "created_at": "2019-12-27T18:11:19.117Z", "purposes": [ "charges" ], "status": "created", "status_detail": { "code": "code", "message": "message", "reason": "unverified", "source": "watchtower" }, "updated_at": "2019-12-27T18:11:19.117Z", "description": "description", "metadata": { "foo": "string" }, "platform_id": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e" }, "meta": { "api_request_id": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", "api_request_timestamp": "2019-12-27T18:11:19.117Z" }, "response_type": "object" } ``` ## List linked bank accounts `$ straddle embed:linked-bank-accounts list` **get** `/v1/linked_bank_accounts` Returns a list of bank accounts associated with a specific Straddle account. The linked bank accounts are returned sorted by creation date, with the most recently created appearing first. This endpoint supports pagination to handle accounts with multiple linked bank accounts. ### Parameters - `--account-id: optional string` Query param: The unique identifier of the related account. - `--level: optional "account" or "platform"` Query param - `--page-number: optional number` Query param: Results page number. Starts at page 1. - `--page-size: optional number` Query param: Page size. Max value: 1000 - `--purpose: optional "charges" or "payouts" or "billing"` Query param: The purpose of the linked bank accounts to return. Possible values: 'charges', 'payouts', 'billing'. - `--sort-by: optional string` Query param: Sort By. - `--sort-order: optional "asc" or "desc"` Query param: Sort Order. - `--status: optional "created" or "onboarding" or "active" or 3 more` Query param: The status of the linked bank accounts to return. Possible values: 'created', 'onboarding', 'active', 'inactive', 'rejected'. - `--correlation-id: optional string` Header param: Optional client generated identifier to trace and debug a series of requests. - `--request-id: optional string` Header param: Optional client generated identifier to trace and debug a request. ### Returns - `linkedBankAccountPagedV1: object { data, meta, response_type }` - `data: array of object { id, account_id, bank_account, 8 more }` - `id: string` Unique identifier for the linked bank account. - `account_id: string` The unique identifier of the Straddle account related to this bank account. - `bank_account: object { account_holder, account_mask, institution_name, routing_number }` - `account_holder: string` - `account_mask: string` - `institution_name: string` - `routing_number: string` - `created_at: string` Timestamp of when the bank account object was created. - `purposes: array of "charges" or "payouts" or "billing"` The purposes for the linked bank account. - `"charges"` - `"payouts"` - `"billing"` - `status: "created" or "onboarding" or "active" or 3 more` The current status of the linked bank account. - `"created"` - `"onboarding"` - `"active"` - `"rejected"` - `"inactive"` - `"canceled"` - `status_detail: object { code, message, reason, source }` - `code: string` A machine-readable code for the specific status, useful for programmatic handling. - `message: string` A human-readable message describing the current status. - `reason: "unverified" or "in_review" or "pending" or 5 more` A machine-readable identifier for the specific status, useful for programmatic handling. - `"unverified"` - `"in_review"` - `"pending"` - `"stuck"` - `"verified"` - `"failed_verification"` - `"disabled"` - `"new"` - `source: "watchtower"` Identifies the origin of the status change (e.g., `watchtower`). This helps in tracking the cause of status updates. - `"watchtower"` - `updated_at: string` Timestamp of the most recent update to the linked bank account. - `description: optional string` Optional description for the bank account. - `metadata: optional map[string]` Up to 20 additional user-defined key-value pairs. Useful for storing additional information about the linked bank account in a structured format. - `platform_id: optional string` The unique identifier of the Straddle Platform relatd to this bank account. - `meta: object { api_request_id, api_request_timestamp, max_page_size, 6 more }` Metadata about the API request, including an identifier, timestamp, and pagination details. - `api_request_id: string` Unique identifier for this API request, useful for troubleshooting. - `api_request_timestamp: string` Timestamp for this API request, useful for troubleshooting. - `max_page_size: number` Maximum allowed page size for this endpoint. - `page_number: number` Page number for paginated results. - `page_size: number` Number of items per page in this response. - `sort_by: string` The field that the results were sorted by. - `sort_order: "asc" or "desc"` - `"asc"` - `"desc"` - `total_items: number` Total number of items returned in this response. - `total_pages: number` The number of pages available. - `response_type: "object" or "array" or "error" or "none"` 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. - `"object"` - `"array"` - `"error"` - `"none"` ### Example ```cli straddle embed:linked-bank-accounts list \ --api-key 'My API Key' ``` #### Response ```json { "data": [ { "id": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", "account_id": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", "bank_account": { "account_holder": "account_holder", "account_mask": "account_mask", "institution_name": "institution_name", "routing_number": "routing_number" }, "created_at": "2019-12-27T18:11:19.117Z", "purposes": [ "charges" ], "status": "created", "status_detail": { "code": "code", "message": "message", "reason": "unverified", "source": "watchtower" }, "updated_at": "2019-12-27T18:11:19.117Z", "description": "description", "metadata": { "foo": "string" }, "platform_id": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e" } ], "meta": { "api_request_id": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", "api_request_timestamp": "2019-12-27T18:11:19.117Z", "max_page_size": 0, "page_number": 0, "page_size": 0, "sort_by": "sort_by", "sort_order": "asc", "total_items": 0, "total_pages": 0 }, "response_type": "object" } ``` ## Update a linked bank account `$ straddle embed:linked-bank-accounts update` **put** `/v1/linked_bank_accounts/{linked_bank_account_id}` Updates an existing linked bank account's information. This can be used to update account details during onboarding or to update metadata associated with the linked account. The linked bank account must be in 'created' or 'onboarding' status. ### Parameters - `--linked-bank-account-id: string` Path param - `--bank-account: object { account_holder, account_number, routing_number }` Body param - `--metadata: optional map[string]` Body param: Up to 20 additional user-defined key-value pairs. Useful for storing additional information about the linked bank account in a structured format. - `--correlation-id: optional string` Header param: Optional client generated identifier to trace and debug a series of requests. - `--idempotency-key: optional string` Header param: Optional client generated value to use for idempotent requests. - `--request-id: optional string` Header param: Optional client generated identifier to trace and debug a request. ### Returns - `linkedBankAccountV1: object { data, meta, response_type }` - `data: object { id, account_id, bank_account, 8 more }` - `id: string` Unique identifier for the linked bank account. - `account_id: string` The unique identifier of the Straddle account related to this bank account. - `bank_account: object { account_holder, account_mask, institution_name, routing_number }` - `account_holder: string` - `account_mask: string` - `institution_name: string` - `routing_number: string` - `created_at: string` Timestamp of when the bank account object was created. - `purposes: array of "charges" or "payouts" or "billing"` The purposes for the linked bank account. - `"charges"` - `"payouts"` - `"billing"` - `status: "created" or "onboarding" or "active" or 3 more` The current status of the linked bank account. - `"created"` - `"onboarding"` - `"active"` - `"rejected"` - `"inactive"` - `"canceled"` - `status_detail: object { code, message, reason, source }` - `code: string` A machine-readable code for the specific status, useful for programmatic handling. - `message: string` A human-readable message describing the current status. - `reason: "unverified" or "in_review" or "pending" or 5 more` A machine-readable identifier for the specific status, useful for programmatic handling. - `"unverified"` - `"in_review"` - `"pending"` - `"stuck"` - `"verified"` - `"failed_verification"` - `"disabled"` - `"new"` - `source: "watchtower"` Identifies the origin of the status change (e.g., `watchtower`). This helps in tracking the cause of status updates. - `"watchtower"` - `updated_at: string` Timestamp of the most recent update to the linked bank account. - `description: optional string` Optional description for the bank account. - `metadata: optional map[string]` Up to 20 additional user-defined key-value pairs. Useful for storing additional information about the linked bank account in a structured format. - `platform_id: optional string` The unique identifier of the Straddle Platform relatd to this bank account. - `meta: object { api_request_id, api_request_timestamp }` Metadata about the API request, including an identifier and timestamp. - `api_request_id: string` Unique identifier for this API request, useful for troubleshooting. - `api_request_timestamp: string` Timestamp for this API request, useful for troubleshooting. - `response_type: "object" or "array" or "error" or "none"` 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. - `"object"` - `"array"` - `"error"` - `"none"` ### Example ```cli straddle embed:linked-bank-accounts update \ --api-key 'My API Key' \ --linked-bank-account-id 182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e \ --bank-account '{account_holder: account_holder, account_number: account_number, routing_number: xxxxxxxxx}' ``` #### Response ```json { "data": { "id": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", "account_id": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", "bank_account": { "account_holder": "account_holder", "account_mask": "account_mask", "institution_name": "institution_name", "routing_number": "routing_number" }, "created_at": "2019-12-27T18:11:19.117Z", "purposes": [ "charges" ], "status": "created", "status_detail": { "code": "code", "message": "message", "reason": "unverified", "source": "watchtower" }, "updated_at": "2019-12-27T18:11:19.117Z", "description": "description", "metadata": { "foo": "string" }, "platform_id": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e" }, "meta": { "api_request_id": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", "api_request_timestamp": "2019-12-27T18:11:19.117Z" }, "response_type": "object" } ``` ## Lookup a linked bank account `$ straddle embed:linked-bank-accounts get` **get** `/v1/linked_bank_accounts/{linked_bank_account_id}` Retrieves the details of a linked bank account that has previously been created. Supply the unique linked bank account `id`, and Straddle will return the corresponding information. The response includes masked account details for security purposes. ### Parameters - `--linked-bank-account-id: string` - `--correlation-id: optional string` Optional client generated identifier to trace and debug a series of requests. - `--request-id: optional string` Optional client generated identifier to trace and debug a request. ### Returns - `linkedBankAccountV1: object { data, meta, response_type }` - `data: object { id, account_id, bank_account, 8 more }` - `id: string` Unique identifier for the linked bank account. - `account_id: string` The unique identifier of the Straddle account related to this bank account. - `bank_account: object { account_holder, account_mask, institution_name, routing_number }` - `account_holder: string` - `account_mask: string` - `institution_name: string` - `routing_number: string` - `created_at: string` Timestamp of when the bank account object was created. - `purposes: array of "charges" or "payouts" or "billing"` The purposes for the linked bank account. - `"charges"` - `"payouts"` - `"billing"` - `status: "created" or "onboarding" or "active" or 3 more` The current status of the linked bank account. - `"created"` - `"onboarding"` - `"active"` - `"rejected"` - `"inactive"` - `"canceled"` - `status_detail: object { code, message, reason, source }` - `code: string` A machine-readable code for the specific status, useful for programmatic handling. - `message: string` A human-readable message describing the current status. - `reason: "unverified" or "in_review" or "pending" or 5 more` A machine-readable identifier for the specific status, useful for programmatic handling. - `"unverified"` - `"in_review"` - `"pending"` - `"stuck"` - `"verified"` - `"failed_verification"` - `"disabled"` - `"new"` - `source: "watchtower"` Identifies the origin of the status change (e.g., `watchtower`). This helps in tracking the cause of status updates. - `"watchtower"` - `updated_at: string` Timestamp of the most recent update to the linked bank account. - `description: optional string` Optional description for the bank account. - `metadata: optional map[string]` Up to 20 additional user-defined key-value pairs. Useful for storing additional information about the linked bank account in a structured format. - `platform_id: optional string` The unique identifier of the Straddle Platform relatd to this bank account. - `meta: object { api_request_id, api_request_timestamp }` Metadata about the API request, including an identifier and timestamp. - `api_request_id: string` Unique identifier for this API request, useful for troubleshooting. - `api_request_timestamp: string` Timestamp for this API request, useful for troubleshooting. - `response_type: "object" or "array" or "error" or "none"` 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. - `"object"` - `"array"` - `"error"` - `"none"` ### Example ```cli straddle embed:linked-bank-accounts get \ --api-key 'My API Key' \ --linked-bank-account-id 182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e ``` #### Response ```json { "data": { "id": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", "account_id": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", "bank_account": { "account_holder": "account_holder", "account_mask": "account_mask", "institution_name": "institution_name", "routing_number": "routing_number" }, "created_at": "2019-12-27T18:11:19.117Z", "purposes": [ "charges" ], "status": "created", "status_detail": { "code": "code", "message": "message", "reason": "unverified", "source": "watchtower" }, "updated_at": "2019-12-27T18:11:19.117Z", "description": "description", "metadata": { "foo": "string" }, "platform_id": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e" }, "meta": { "api_request_id": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", "api_request_timestamp": "2019-12-27T18:11:19.117Z" }, "response_type": "object" } ``` ## Unmask a linked bank account `$ straddle embed:linked-bank-accounts unmask` **get** `/v1/linked_bank_accounts/{linked_bank_account_id}/unmask` Retrieves the unmasked details of a linked bank account that has previously been created. Supply the unique linked bank account `id`, and Straddle will return the corresponding information, including sensitive details. This endpoint needs to be enabled by Straddle for your account and should only be used when absolutely necessary. ### Parameters - `--linked-bank-account-id: string` - `--correlation-id: optional string` Optional client generated identifier to trace and debug a series of requests. - `--request-id: optional string` Optional client generated identifier to trace and debug a request. ### Returns - `linkedBankAccountUnmaskV1: object { data, meta, response_type }` - `data: object { id, account_id, bank_account, 5 more }` - `id: string` Unique identifier for the linked bank account. - `account_id: string` Unique identifier for the Straddle account related to this bank account. - `bank_account: object { account_holder, account_number, institution_name, routing_number }` The bank account details associated with the linked bank account. - `account_holder: string` - `account_number: string` - `institution_name: string` - `routing_number: string` - `created_at: string` Timestamp of when the linked bank account was created. - `status: "created" or "onboarding" or "active" or 3 more` The current status of the linked bank account. - `"created"` - `"onboarding"` - `"active"` - `"rejected"` - `"inactive"` - `"canceled"` - `status_detail: object { code, message, reason, source }` Additional details about the current status of the linked bank account. - `code: string` A machine-readable code for the specific status, useful for programmatic handling. - `message: string` A human-readable message describing the current status. - `reason: "unverified" or "in_review" or "pending" or 5 more` A machine-readable identifier for the specific status, useful for programmatic handling. - `"unverified"` - `"in_review"` - `"pending"` - `"stuck"` - `"verified"` - `"failed_verification"` - `"disabled"` - `"new"` - `source: "watchtower"` Identifies the origin of the status change (e.g., `watchtower`). This helps in tracking the cause of status updates. - `"watchtower"` - `updated_at: string` Timestamp of when the linked bank account was last updated. - `metadata: optional map[string]` - `meta: object { api_request_id, api_request_timestamp }` Metadata about the API request, including an identifier and timestamp. - `api_request_id: string` Unique identifier for this API request, useful for troubleshooting. - `api_request_timestamp: string` Timestamp for this API request, useful for troubleshooting. - `response_type: "object" or "array" or "error" or "none"` 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. - `"object"` - `"array"` - `"error"` - `"none"` ### Example ```cli straddle embed:linked-bank-accounts unmask \ --api-key 'My API Key' \ --linked-bank-account-id 182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e ``` #### Response ```json { "data": { "id": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", "account_id": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", "bank_account": { "account_holder": "account_holder", "account_number": "account_number", "institution_name": "institution_name", "routing_number": "routing_number" }, "created_at": "2019-12-27T18:11:19.117Z", "status": "created", "status_detail": { "code": "code", "message": "message", "reason": "unverified", "source": "watchtower" }, "updated_at": "2019-12-27T18:11:19.117Z", "metadata": { "foo": "string" } }, "meta": { "api_request_id": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", "api_request_timestamp": "2019-12-27T18:11:19.117Z" }, "response_type": "object" } ``` ## Cancel a linked bank account `$ straddle embed:linked-bank-accounts cancel` **patch** `/v1/linked_bank_accounts/{linked_bank_account_id}/cancel` Cancels an existing linked bank account. This can be used to cancel a linked bank account before it has been reviewed. The linked bank account must be in 'created' status. ### Parameters - `--linked-bank-account-id: string` - `--correlation-id: optional string` Optional client generated identifier to trace and debug a series of requests. - `--idempotency-key: optional string` Optional client generated value to use for idempotent requests. - `--request-id: optional string` Optional client generated identifier to trace and debug a request. ### Returns - `linkedBankAccountV1: object { data, meta, response_type }` - `data: object { id, account_id, bank_account, 8 more }` - `id: string` Unique identifier for the linked bank account. - `account_id: string` The unique identifier of the Straddle account related to this bank account. - `bank_account: object { account_holder, account_mask, institution_name, routing_number }` - `account_holder: string` - `account_mask: string` - `institution_name: string` - `routing_number: string` - `created_at: string` Timestamp of when the bank account object was created. - `purposes: array of "charges" or "payouts" or "billing"` The purposes for the linked bank account. - `"charges"` - `"payouts"` - `"billing"` - `status: "created" or "onboarding" or "active" or 3 more` The current status of the linked bank account. - `"created"` - `"onboarding"` - `"active"` - `"rejected"` - `"inactive"` - `"canceled"` - `status_detail: object { code, message, reason, source }` - `code: string` A machine-readable code for the specific status, useful for programmatic handling. - `message: string` A human-readable message describing the current status. - `reason: "unverified" or "in_review" or "pending" or 5 more` A machine-readable identifier for the specific status, useful for programmatic handling. - `"unverified"` - `"in_review"` - `"pending"` - `"stuck"` - `"verified"` - `"failed_verification"` - `"disabled"` - `"new"` - `source: "watchtower"` Identifies the origin of the status change (e.g., `watchtower`). This helps in tracking the cause of status updates. - `"watchtower"` - `updated_at: string` Timestamp of the most recent update to the linked bank account. - `description: optional string` Optional description for the bank account. - `metadata: optional map[string]` Up to 20 additional user-defined key-value pairs. Useful for storing additional information about the linked bank account in a structured format. - `platform_id: optional string` The unique identifier of the Straddle Platform relatd to this bank account. - `meta: object { api_request_id, api_request_timestamp }` Metadata about the API request, including an identifier and timestamp. - `api_request_id: string` Unique identifier for this API request, useful for troubleshooting. - `api_request_timestamp: string` Timestamp for this API request, useful for troubleshooting. - `response_type: "object" or "array" or "error" or "none"` 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. - `"object"` - `"array"` - `"error"` - `"none"` ### Example ```cli straddle embed:linked-bank-accounts cancel \ --api-key 'My API Key' \ --linked-bank-account-id 182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e ``` #### Response ```json { "data": { "id": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", "account_id": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", "bank_account": { "account_holder": "account_holder", "account_mask": "account_mask", "institution_name": "institution_name", "routing_number": "routing_number" }, "created_at": "2019-12-27T18:11:19.117Z", "purposes": [ "charges" ], "status": "created", "status_detail": { "code": "code", "message": "message", "reason": "unverified", "source": "watchtower" }, "updated_at": "2019-12-27T18:11:19.117Z", "description": "description", "metadata": { "foo": "string" }, "platform_id": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e" }, "meta": { "api_request_id": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", "api_request_timestamp": "2019-12-27T18:11:19.117Z" }, "response_type": "object" } ``` ## Domain Types ### Linked Bank Account Paged V1 - `linkedBankAccountPagedV1: object { data, meta, response_type }` - `data: array of object { id, account_id, bank_account, 8 more }` - `id: string` Unique identifier for the linked bank account. - `account_id: string` The unique identifier of the Straddle account related to this bank account. - `bank_account: object { account_holder, account_mask, institution_name, routing_number }` - `account_holder: string` - `account_mask: string` - `institution_name: string` - `routing_number: string` - `created_at: string` Timestamp of when the bank account object was created. - `purposes: array of "charges" or "payouts" or "billing"` The purposes for the linked bank account. - `"charges"` - `"payouts"` - `"billing"` - `status: "created" or "onboarding" or "active" or 3 more` The current status of the linked bank account. - `"created"` - `"onboarding"` - `"active"` - `"rejected"` - `"inactive"` - `"canceled"` - `status_detail: object { code, message, reason, source }` - `code: string` A machine-readable code for the specific status, useful for programmatic handling. - `message: string` A human-readable message describing the current status. - `reason: "unverified" or "in_review" or "pending" or 5 more` A machine-readable identifier for the specific status, useful for programmatic handling. - `"unverified"` - `"in_review"` - `"pending"` - `"stuck"` - `"verified"` - `"failed_verification"` - `"disabled"` - `"new"` - `source: "watchtower"` Identifies the origin of the status change (e.g., `watchtower`). This helps in tracking the cause of status updates. - `"watchtower"` - `updated_at: string` Timestamp of the most recent update to the linked bank account. - `description: optional string` Optional description for the bank account. - `metadata: optional map[string]` Up to 20 additional user-defined key-value pairs. Useful for storing additional information about the linked bank account in a structured format. - `platform_id: optional string` The unique identifier of the Straddle Platform relatd to this bank account. - `meta: object { api_request_id, api_request_timestamp, max_page_size, 6 more }` Metadata about the API request, including an identifier, timestamp, and pagination details. - `api_request_id: string` Unique identifier for this API request, useful for troubleshooting. - `api_request_timestamp: string` Timestamp for this API request, useful for troubleshooting. - `max_page_size: number` Maximum allowed page size for this endpoint. - `page_number: number` Page number for paginated results. - `page_size: number` Number of items per page in this response. - `sort_by: string` The field that the results were sorted by. - `sort_order: "asc" or "desc"` - `"asc"` - `"desc"` - `total_items: number` Total number of items returned in this response. - `total_pages: number` The number of pages available. - `response_type: "object" or "array" or "error" or "none"` 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. - `"object"` - `"array"` - `"error"` - `"none"` ### Linked Bank Account Unmask V1 - `linkedBankAccountUnmaskV1: object { data, meta, response_type }` - `data: object { id, account_id, bank_account, 5 more }` - `id: string` Unique identifier for the linked bank account. - `account_id: string` Unique identifier for the Straddle account related to this bank account. - `bank_account: object { account_holder, account_number, institution_name, routing_number }` The bank account details associated with the linked bank account. - `account_holder: string` - `account_number: string` - `institution_name: string` - `routing_number: string` - `created_at: string` Timestamp of when the linked bank account was created. - `status: "created" or "onboarding" or "active" or 3 more` The current status of the linked bank account. - `"created"` - `"onboarding"` - `"active"` - `"rejected"` - `"inactive"` - `"canceled"` - `status_detail: object { code, message, reason, source }` Additional details about the current status of the linked bank account. - `code: string` A machine-readable code for the specific status, useful for programmatic handling. - `message: string` A human-readable message describing the current status. - `reason: "unverified" or "in_review" or "pending" or 5 more` A machine-readable identifier for the specific status, useful for programmatic handling. - `"unverified"` - `"in_review"` - `"pending"` - `"stuck"` - `"verified"` - `"failed_verification"` - `"disabled"` - `"new"` - `source: "watchtower"` Identifies the origin of the status change (e.g., `watchtower`). This helps in tracking the cause of status updates. - `"watchtower"` - `updated_at: string` Timestamp of when the linked bank account was last updated. - `metadata: optional map[string]` - `meta: object { api_request_id, api_request_timestamp }` Metadata about the API request, including an identifier and timestamp. - `api_request_id: string` Unique identifier for this API request, useful for troubleshooting. - `api_request_timestamp: string` Timestamp for this API request, useful for troubleshooting. - `response_type: "object" or "array" or "error" or "none"` 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. - `"object"` - `"array"` - `"error"` - `"none"` ### Linked Bank Account V1 - `linkedBankAccountV1: object { data, meta, response_type }` - `data: object { id, account_id, bank_account, 8 more }` - `id: string` Unique identifier for the linked bank account. - `account_id: string` The unique identifier of the Straddle account related to this bank account. - `bank_account: object { account_holder, account_mask, institution_name, routing_number }` - `account_holder: string` - `account_mask: string` - `institution_name: string` - `routing_number: string` - `created_at: string` Timestamp of when the bank account object was created. - `purposes: array of "charges" or "payouts" or "billing"` The purposes for the linked bank account. - `"charges"` - `"payouts"` - `"billing"` - `status: "created" or "onboarding" or "active" or 3 more` The current status of the linked bank account. - `"created"` - `"onboarding"` - `"active"` - `"rejected"` - `"inactive"` - `"canceled"` - `status_detail: object { code, message, reason, source }` - `code: string` A machine-readable code for the specific status, useful for programmatic handling. - `message: string` A human-readable message describing the current status. - `reason: "unverified" or "in_review" or "pending" or 5 more` A machine-readable identifier for the specific status, useful for programmatic handling. - `"unverified"` - `"in_review"` - `"pending"` - `"stuck"` - `"verified"` - `"failed_verification"` - `"disabled"` - `"new"` - `source: "watchtower"` Identifies the origin of the status change (e.g., `watchtower`). This helps in tracking the cause of status updates. - `"watchtower"` - `updated_at: string` Timestamp of the most recent update to the linked bank account. - `description: optional string` Optional description for the bank account. - `metadata: optional map[string]` Up to 20 additional user-defined key-value pairs. Useful for storing additional information about the linked bank account in a structured format. - `platform_id: optional string` The unique identifier of the Straddle Platform relatd to this bank account. - `meta: object { api_request_id, api_request_timestamp }` Metadata about the API request, including an identifier and timestamp. - `api_request_id: string` Unique identifier for this API request, useful for troubleshooting. - `api_request_timestamp: string` Timestamp for this API request, useful for troubleshooting. - `response_type: "object" or "array" or "error" or "none"` 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. - `"object"` - `"array"` - `"error"` - `"none"` # Organizations ## Create an organization `$ straddle embed:organizations create` **post** `/v1/organizations` Creates a new organization related to your Straddle integration. Organizations can be used to group related accounts and manage permissions across multiple users. ### Parameters - `--name: string` Body param: The name of the organization. - `--external-id: optional string` Body param: Unique identifier for the organization in your database, used for cross-referencing between Straddle and your systems. - `--metadata: optional map[string]` Body param: Up to 20 additional user-defined key-value pairs. Useful for storing additional information about the organization in a structured format. - `--correlation-id: optional string` Header param: Optional client generated identifier to trace and debug a series of requests. - `--idempotency-key: optional string` Header param: Optional client generated value to use for idempotent requests. - `--request-id: optional string` Header param: Optional client generated identifier to trace and debug a request. ### Returns - `organizationV1: object { data, meta, response_type }` - `data: object { id, created_at, name, 3 more }` - `id: string` Straddle's unique identifier for the organization. - `created_at: string` Timestamp of when the organization was created. - `name: string` The name of the organization. - `updated_at: string` Timestamp of the most recent update to the organization. - `external_id: optional string` Unique identifier for the organization in your database, used for cross-referencing between Straddle and your systems. - `metadata: optional map[string]` Up to 20 additional user-defined key-value pairs. Useful for storing additional information about the organization in a structured format. - `meta: object { api_request_id, api_request_timestamp }` Metadata about the API request, including an identifier and timestamp. - `api_request_id: string` Unique identifier for this API request, useful for troubleshooting. - `api_request_timestamp: string` Timestamp for this API request, useful for troubleshooting. - `response_type: "object" or "array" or "error" or "none"` 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. - `"object"` - `"array"` - `"error"` - `"none"` ### Example ```cli straddle embed:organizations create \ --api-key 'My API Key' \ --name name ``` #### Response ```json { "data": { "id": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", "created_at": "2019-12-27T18:11:19.117Z", "name": "name", "updated_at": "2019-12-27T18:11:19.117Z", "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" } ``` ## List organizations `$ straddle embed:organizations list` **get** `/v1/organizations` Retrieves a list of organizations associated with your Straddle integration. The organizations are returned sorted by creation date, with the most recently created organizations appearing first. This endpoint supports advanced sorting and filtering options to help you find specific organizations. ### Parameters - `--external-id: optional string` Query param: List organizations by their external ID. - `--name: optional string` Query param: List organizations by name (partial match supported). - `--page-number: optional number` Query param: Results page number. Starts at page 1. - `--page-size: optional number` Query param: Page size. Max value: 1000 - `--sort-by: optional string` Query param: Sort By. - `--sort-order: optional "asc" or "desc"` Query param: Sort Order. - `--correlation-id: optional string` Header param: Optional client generated identifier to trace and debug a series of requests. - `--request-id: optional string` Header param: Optional client generated identifier to trace and debug a request. ### Returns - `organizationPagedV1: object { data, meta, response_type }` - `data: array of object { id, created_at, name, 3 more }` - `id: string` Straddle's unique identifier for the organization. - `created_at: string` Timestamp of when the organization was created. - `name: string` The name of the organization. - `updated_at: string` Timestamp of the most recent update to the organization. - `external_id: optional string` Unique identifier for the organization in your database, used for cross-referencing between Straddle and your systems. - `metadata: optional map[string]` Up to 20 additional user-defined key-value pairs. Useful for storing additional information about the organization in a structured format. - `meta: object { api_request_id, api_request_timestamp, max_page_size, 6 more }` Metadata about the API request, including an identifier, timestamp, and pagination details. - `api_request_id: string` Unique identifier for this API request, useful for troubleshooting. - `api_request_timestamp: string` Timestamp for this API request, useful for troubleshooting. - `max_page_size: number` Maximum allowed page size for this endpoint. - `page_number: number` Page number for paginated results. - `page_size: number` Number of items per page in this response. - `sort_by: string` The field that the results were sorted by. - `sort_order: "asc" or "desc"` - `"asc"` - `"desc"` - `total_items: number` Total number of items returned in this response. - `total_pages: number` The number of pages available. - `response_type: "object" or "array" or "error" or "none"` 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. - `"object"` - `"array"` - `"error"` - `"none"` ### Example ```cli straddle embed:organizations list \ --api-key 'My API Key' ``` #### Response ```json { "data": [ { "id": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", "created_at": "2019-12-27T18:11:19.117Z", "name": "name", "updated_at": "2019-12-27T18:11:19.117Z", "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", "max_page_size": 0, "page_number": 0, "page_size": 0, "sort_by": "sort_by", "sort_order": "asc", "total_items": 0, "total_pages": 0 }, "response_type": "object" } ``` ## Retrieve organization details `$ straddle embed:organizations get` **get** `/v1/organizations/{organization_id}` Retrieves the details of an Organization that has previously been created. Supply the unique organization ID that was returned from your previous request, and Straddle will return the corresponding organization information. ### Parameters - `--organization-id: string` - `--correlation-id: optional string` Optional client generated identifier to trace and debug a series of requests. - `--request-id: optional string` Optional client generated identifier to trace and debug a request. ### Returns - `organizationV1: object { data, meta, response_type }` - `data: object { id, created_at, name, 3 more }` - `id: string` Straddle's unique identifier for the organization. - `created_at: string` Timestamp of when the organization was created. - `name: string` The name of the organization. - `updated_at: string` Timestamp of the most recent update to the organization. - `external_id: optional string` Unique identifier for the organization in your database, used for cross-referencing between Straddle and your systems. - `metadata: optional map[string]` Up to 20 additional user-defined key-value pairs. Useful for storing additional information about the organization in a structured format. - `meta: object { api_request_id, api_request_timestamp }` Metadata about the API request, including an identifier and timestamp. - `api_request_id: string` Unique identifier for this API request, useful for troubleshooting. - `api_request_timestamp: string` Timestamp for this API request, useful for troubleshooting. - `response_type: "object" or "array" or "error" or "none"` 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. - `"object"` - `"array"` - `"error"` - `"none"` ### Example ```cli straddle embed:organizations get \ --api-key 'My API Key' \ --organization-id 182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e ``` #### Response ```json { "data": { "id": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", "created_at": "2019-12-27T18:11:19.117Z", "name": "name", "updated_at": "2019-12-27T18:11:19.117Z", "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" } ``` ## Domain Types ### Organization Paged V1 - `organizationPagedV1: object { data, meta, response_type }` - `data: array of object { id, created_at, name, 3 more }` - `id: string` Straddle's unique identifier for the organization. - `created_at: string` Timestamp of when the organization was created. - `name: string` The name of the organization. - `updated_at: string` Timestamp of the most recent update to the organization. - `external_id: optional string` Unique identifier for the organization in your database, used for cross-referencing between Straddle and your systems. - `metadata: optional map[string]` Up to 20 additional user-defined key-value pairs. Useful for storing additional information about the organization in a structured format. - `meta: object { api_request_id, api_request_timestamp, max_page_size, 6 more }` Metadata about the API request, including an identifier, timestamp, and pagination details. - `api_request_id: string` Unique identifier for this API request, useful for troubleshooting. - `api_request_timestamp: string` Timestamp for this API request, useful for troubleshooting. - `max_page_size: number` Maximum allowed page size for this endpoint. - `page_number: number` Page number for paginated results. - `page_size: number` Number of items per page in this response. - `sort_by: string` The field that the results were sorted by. - `sort_order: "asc" or "desc"` - `"asc"` - `"desc"` - `total_items: number` Total number of items returned in this response. - `total_pages: number` The number of pages available. - `response_type: "object" or "array" or "error" or "none"` 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. - `"object"` - `"array"` - `"error"` - `"none"` ### Organization V1 - `organizationV1: object { data, meta, response_type }` - `data: object { id, created_at, name, 3 more }` - `id: string` Straddle's unique identifier for the organization. - `created_at: string` Timestamp of when the organization was created. - `name: string` The name of the organization. - `updated_at: string` Timestamp of the most recent update to the organization. - `external_id: optional string` Unique identifier for the organization in your database, used for cross-referencing between Straddle and your systems. - `metadata: optional map[string]` Up to 20 additional user-defined key-value pairs. Useful for storing additional information about the organization in a structured format. - `meta: object { api_request_id, api_request_timestamp }` Metadata about the API request, including an identifier and timestamp. - `api_request_id: string` Unique identifier for this API request, useful for troubleshooting. - `api_request_timestamp: string` Timestamp for this API request, useful for troubleshooting. - `response_type: "object" or "array" or "error" or "none"` 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. - `"object"` - `"array"` - `"error"` - `"none"` # Representatives ## Create a representative `$ straddle embed:representatives create` **post** `/v1/representatives` Creates a new representative associated with an account. Representatives are individuals who have legal authority or significant responsibility within the business. ### Parameters - `--account-id: string` Body param: The unique identifier of the account this representative is associated with. - `--dob: string` Body param: Date of birth for the representative in ISO 8601 format (YYYY-MM-DD). - `--email: string` Body param: The company email address of the representative. - `--first-name: string` Body param: The first name of the representative. - `--last-name: string` Body param: The last name of the representative. - `--mobile-number: string` Body param: The mobile phone number of the representative. - `--relationship: object { control, owner, primary, 2 more }` Body param - `--ssn-last4: string` Body param: The last 4 digits of the representative's Social Security Number. - `--external-id: optional string` Body param: Unique identifier for the representative in your database, used for cross-referencing between Straddle and your systems. - `--metadata: optional map[string]` Body param: Up to 20 additional user-defined key-value pairs. Useful for storing additional information about the represetative in a structured format. - `--correlation-id: optional string` Header param: Optional client generated identifier to trace and debug a series of requests. - `--idempotency-key: optional string` Header param: Optional client generated value to use for idempotent requests. - `--request-id: optional string` Header param: Optional client generated identifier to trace and debug a request. ### Returns - `representative: object { data, meta, response_type }` - `data: object { id, account_id, created_at, 15 more }` - `id: string` Unique identifier for the representative. - `account_id: string` The unique identifier of the account this representative is associated with. - `created_at: string` Timestamp of when the representative was created. - `dob: string` The date of birth of the representative, in ISO 8601 format (YYYY-MM-DD). - `email: string` The email address of the representative. - `first_name: string` The first name of the representative. - `last_name: string` The last name of the representative. - `mobile_number: string` The mobile phone number of the representative. - `name: string` - `relationship: object { control, owner, primary, 2 more }` - `control: boolean` Whether the representative has significant responsibility to control, manage, or direct the organization. One representative must be identified under the control prong for each legal entity. - `owner: boolean` Whether the representative owns any percentage of of the equity interests of the legal entity. - `primary: boolean` Whether the person is authorized as the primary representative of the account. This is the person chosen by the business to provide information about themselves, general information about the account, and who consented to the services agreement. There can be only one primary representative for an account at a time. - `percent_ownership: optional number` The percentage of ownership the representative has. Required if 'Owner' is true. - `title: optional string` The job title of the representative. - `ssn_last4: string` The last 4 digits of the representative's Social Security Number. - `status: "created" or "onboarding" or "active" or 2 more` The current status of the representative. - `"created"` - `"onboarding"` - `"active"` - `"rejected"` - `"inactive"` - `status_detail: object { code, message, reason, source }` - `code: string` A machine-readable code for the specific status, useful for programmatic handling. - `message: string` A human-readable message describing the current status. - `reason: "unverified" or "in_review" or "pending" or 5 more` A machine-readable identifier for the specific status, useful for programmatic handling. - `"unverified"` - `"in_review"` - `"pending"` - `"stuck"` - `"verified"` - `"failed_verification"` - `"disabled"` - `"new"` - `source: "watchtower"` Identifies the origin of the status change (e.g., `watchtower`). This helps in tracking the cause of status updates. - `"watchtower"` - `updated_at: string` Timestamp of the most recent update to the representative. - `external_id: optional string` Unique identifier for the representative in your database, used for cross-referencing between Straddle and your systems. - `metadata: optional map[string]` Up to 20 additional user-defined key-value pairs. Useful for storing additional information about the represetative in a structured format. - `phone: optional string` - `user_id: optional string` The unique identifier of the user account associated with this representative, if applicable. - `meta: object { api_request_id, api_request_timestamp }` Metadata about the API request, including an identifier and timestamp. - `api_request_id: string` Unique identifier for this API request, useful for troubleshooting. - `api_request_timestamp: string` Timestamp for this API request, useful for troubleshooting. - `response_type: "object" or "array" or "error" or "none"` 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. - `"object"` - `"array"` - `"error"` - `"none"` ### Example ```cli straddle embed:representatives create \ --api-key 'My API Key' \ --account-id 182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e \ --dob "'1980-01-01'" \ --email ron.swanson@pawnee.com \ --first-name first_name \ --last-name last_name \ --mobile-number +12128675309 \ --relationship '{control: true, owner: true, primary: true}' \ --ssn-last4 1234 ``` #### Response ```json { "data": { "id": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", "account_id": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", "created_at": "2019-12-27T18:11:19.117Z", "dob": "1980-01-01", "email": "ron.swanson@pawnee.com", "first_name": "Ron", "last_name": "Swanson", "mobile_number": "+12128675309", "name": "name", "relationship": { "control": true, "owner": true, "primary": true, "percent_ownership": 0, "title": "title" }, "ssn_last4": "1234", "status": "created", "status_detail": { "code": "code", "message": "message", "reason": "unverified", "source": "watchtower" }, "updated_at": "2019-12-27T18:11:19.117Z", "external_id": "external_id", "metadata": { "foo": "string" }, "phone": "phone", "user_id": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e" }, "meta": { "api_request_id": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", "api_request_timestamp": "2019-12-27T18:11:19.117Z" }, "response_type": "object" } ``` ## List representatives `$ straddle embed:representatives list` **get** `/v1/representatives` Returns a list of representatives associated with a specific account or organization. The representatives are returned sorted by creation date, with the most recently created representatives appearing first. This endpoint supports advanced sorting and filtering options. ### Parameters - `--account-id: optional string` Query param: The unique identifier of the account to list representatives for. - `--level: optional "account" or "platform"` Query param - `--organization-id: optional string` Query param - `--page-number: optional number` Query param: Results page number. Starts at page 1. - `--page-size: optional number` Query param: Page size. Max value: 1000 - `--platform-id: optional string` Query param - `--sort-by: optional string` Query param: Sort By. - `--sort-order: optional "asc" or "desc"` Query param: Sort Order. - `--correlation-id: optional string` Header param: Optional client generated identifier to trace and debug a series of requests. - `--request-id: optional string` Header param: Optional client generated identifier to trace and debug a request. ### Returns - `representativePaged: object { data, meta, response_type }` - `data: array of object { id, account_id, created_at, 15 more }` - `id: string` Unique identifier for the representative. - `account_id: string` The unique identifier of the account this representative is associated with. - `created_at: string` Timestamp of when the representative was created. - `dob: string` The date of birth of the representative, in ISO 8601 format (YYYY-MM-DD). - `email: string` The email address of the representative. - `first_name: string` The first name of the representative. - `last_name: string` The last name of the representative. - `mobile_number: string` The mobile phone number of the representative. - `name: string` - `relationship: object { control, owner, primary, 2 more }` - `control: boolean` Whether the representative has significant responsibility to control, manage, or direct the organization. One representative must be identified under the control prong for each legal entity. - `owner: boolean` Whether the representative owns any percentage of of the equity interests of the legal entity. - `primary: boolean` Whether the person is authorized as the primary representative of the account. This is the person chosen by the business to provide information about themselves, general information about the account, and who consented to the services agreement. There can be only one primary representative for an account at a time. - `percent_ownership: optional number` The percentage of ownership the representative has. Required if 'Owner' is true. - `title: optional string` The job title of the representative. - `ssn_last4: string` The last 4 digits of the representative's Social Security Number. - `status: "created" or "onboarding" or "active" or 2 more` The current status of the representative. - `"created"` - `"onboarding"` - `"active"` - `"rejected"` - `"inactive"` - `status_detail: object { code, message, reason, source }` - `code: string` A machine-readable code for the specific status, useful for programmatic handling. - `message: string` A human-readable message describing the current status. - `reason: "unverified" or "in_review" or "pending" or 5 more` A machine-readable identifier for the specific status, useful for programmatic handling. - `"unverified"` - `"in_review"` - `"pending"` - `"stuck"` - `"verified"` - `"failed_verification"` - `"disabled"` - `"new"` - `source: "watchtower"` Identifies the origin of the status change (e.g., `watchtower`). This helps in tracking the cause of status updates. - `"watchtower"` - `updated_at: string` Timestamp of the most recent update to the representative. - `external_id: optional string` Unique identifier for the representative in your database, used for cross-referencing between Straddle and your systems. - `metadata: optional map[string]` Up to 20 additional user-defined key-value pairs. Useful for storing additional information about the represetative in a structured format. - `phone: optional string` - `user_id: optional string` The unique identifier of the user account associated with this representative, if applicable. - `meta: object { api_request_id, api_request_timestamp, max_page_size, 6 more }` Metadata about the API request, including an identifier, timestamp, and pagination details. - `api_request_id: string` Unique identifier for this API request, useful for troubleshooting. - `api_request_timestamp: string` Timestamp for this API request, useful for troubleshooting. - `max_page_size: number` Maximum allowed page size for this endpoint. - `page_number: number` Page number for paginated results. - `page_size: number` Number of items per page in this response. - `sort_by: string` The field that the results were sorted by. - `sort_order: "asc" or "desc"` - `"asc"` - `"desc"` - `total_items: number` Total number of items returned in this response. - `total_pages: number` The number of pages available. - `response_type: "object" or "array" or "error" or "none"` 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. - `"object"` - `"array"` - `"error"` - `"none"` ### Example ```cli straddle embed:representatives list \ --api-key 'My API Key' ``` #### Response ```json { "data": [ { "id": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", "account_id": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", "created_at": "2019-12-27T18:11:19.117Z", "dob": "1980-01-01", "email": "ron.swanson@pawnee.com", "first_name": "Ron", "last_name": "Swanson", "mobile_number": "+12128675309", "name": "name", "relationship": { "control": true, "owner": true, "primary": true, "percent_ownership": 0, "title": "title" }, "ssn_last4": "1234", "status": "created", "status_detail": { "code": "code", "message": "message", "reason": "unverified", "source": "watchtower" }, "updated_at": "2019-12-27T18:11:19.117Z", "external_id": "external_id", "metadata": { "foo": "string" }, "phone": "phone", "user_id": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e" } ], "meta": { "api_request_id": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", "api_request_timestamp": "2019-12-27T18:11:19.117Z", "max_page_size": 0, "page_number": 0, "page_size": 0, "sort_by": "sort_by", "sort_order": "asc", "total_items": 0, "total_pages": 0 }, "response_type": "object" } ``` ## Update a representative `$ straddle embed:representatives update` **put** `/v1/representatives/{representative_id}` Updates an existing representative's information. This can be used to update personal details, contact information, or the relationship to the account or organization. ### Parameters - `--representative-id: string` Path param - `--dob: string` Body param: The date of birth of the representative, in ISO 8601 format (YYYY-MM-DD). - `--email: string` Body param: The email address of the representative. - `--first-name: string` Body param: The first name of the representative. - `--last-name: string` Body param: The last name of the representative. - `--mobile-number: string` Body param: The mobile phone number of the representative. - `--relationship: object { control, owner, primary, 2 more }` Body param - `--ssn-last4: string` Body param: The last 4 digits of the representative's Social Security Number. - `--external-id: optional string` Body param: Unique identifier for the representative in your database, used for cross-referencing between Straddle and your systems. - `--metadata: optional map[string]` Body param: Up to 20 additional user-defined key-value pairs. Useful for storing additional information about the represetative in a structured format. - `--correlation-id: optional string` Header param: Optional client generated identifier to trace and debug a series of requests. - `--idempotency-key: optional string` Header param: Optional client generated value to use for idempotent requests. - `--request-id: optional string` Header param: Optional client generated identifier to trace and debug a request. ### Returns - `representative: object { data, meta, response_type }` - `data: object { id, account_id, created_at, 15 more }` - `id: string` Unique identifier for the representative. - `account_id: string` The unique identifier of the account this representative is associated with. - `created_at: string` Timestamp of when the representative was created. - `dob: string` The date of birth of the representative, in ISO 8601 format (YYYY-MM-DD). - `email: string` The email address of the representative. - `first_name: string` The first name of the representative. - `last_name: string` The last name of the representative. - `mobile_number: string` The mobile phone number of the representative. - `name: string` - `relationship: object { control, owner, primary, 2 more }` - `control: boolean` Whether the representative has significant responsibility to control, manage, or direct the organization. One representative must be identified under the control prong for each legal entity. - `owner: boolean` Whether the representative owns any percentage of of the equity interests of the legal entity. - `primary: boolean` Whether the person is authorized as the primary representative of the account. This is the person chosen by the business to provide information about themselves, general information about the account, and who consented to the services agreement. There can be only one primary representative for an account at a time. - `percent_ownership: optional number` The percentage of ownership the representative has. Required if 'Owner' is true. - `title: optional string` The job title of the representative. - `ssn_last4: string` The last 4 digits of the representative's Social Security Number. - `status: "created" or "onboarding" or "active" or 2 more` The current status of the representative. - `"created"` - `"onboarding"` - `"active"` - `"rejected"` - `"inactive"` - `status_detail: object { code, message, reason, source }` - `code: string` A machine-readable code for the specific status, useful for programmatic handling. - `message: string` A human-readable message describing the current status. - `reason: "unverified" or "in_review" or "pending" or 5 more` A machine-readable identifier for the specific status, useful for programmatic handling. - `"unverified"` - `"in_review"` - `"pending"` - `"stuck"` - `"verified"` - `"failed_verification"` - `"disabled"` - `"new"` - `source: "watchtower"` Identifies the origin of the status change (e.g., `watchtower`). This helps in tracking the cause of status updates. - `"watchtower"` - `updated_at: string` Timestamp of the most recent update to the representative. - `external_id: optional string` Unique identifier for the representative in your database, used for cross-referencing between Straddle and your systems. - `metadata: optional map[string]` Up to 20 additional user-defined key-value pairs. Useful for storing additional information about the represetative in a structured format. - `phone: optional string` - `user_id: optional string` The unique identifier of the user account associated with this representative, if applicable. - `meta: object { api_request_id, api_request_timestamp }` Metadata about the API request, including an identifier and timestamp. - `api_request_id: string` Unique identifier for this API request, useful for troubleshooting. - `api_request_timestamp: string` Timestamp for this API request, useful for troubleshooting. - `response_type: "object" or "array" or "error" or "none"` 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. - `"object"` - `"array"` - `"error"` - `"none"` ### Example ```cli straddle embed:representatives update \ --api-key 'My API Key' \ --representative-id 182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e \ --dob "'1980-01-01'" \ --email ron.swanson@pawnee.com \ --first-name Ron \ --last-name Swanson \ --mobile-number +12128675309 \ --relationship '{control: true, owner: true, primary: true}' \ --ssn-last4 1234 ``` #### Response ```json { "data": { "id": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", "account_id": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", "created_at": "2019-12-27T18:11:19.117Z", "dob": "1980-01-01", "email": "ron.swanson@pawnee.com", "first_name": "Ron", "last_name": "Swanson", "mobile_number": "+12128675309", "name": "name", "relationship": { "control": true, "owner": true, "primary": true, "percent_ownership": 0, "title": "title" }, "ssn_last4": "1234", "status": "created", "status_detail": { "code": "code", "message": "message", "reason": "unverified", "source": "watchtower" }, "updated_at": "2019-12-27T18:11:19.117Z", "external_id": "external_id", "metadata": { "foo": "string" }, "phone": "phone", "user_id": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e" }, "meta": { "api_request_id": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", "api_request_timestamp": "2019-12-27T18:11:19.117Z" }, "response_type": "object" } ``` ## Lookup a representative `$ straddle embed:representatives get` **get** `/v1/representatives/{representative_id}` Retrieves the details of an existing representative. Supply the unique representative ID, and Straddle will return the corresponding representative information. ### Parameters - `--representative-id: string` - `--correlation-id: optional string` Optional client generated identifier to trace and debug a series of requests. - `--request-id: optional string` Optional client generated identifier to trace and debug a request. ### Returns - `representative: object { data, meta, response_type }` - `data: object { id, account_id, created_at, 15 more }` - `id: string` Unique identifier for the representative. - `account_id: string` The unique identifier of the account this representative is associated with. - `created_at: string` Timestamp of when the representative was created. - `dob: string` The date of birth of the representative, in ISO 8601 format (YYYY-MM-DD). - `email: string` The email address of the representative. - `first_name: string` The first name of the representative. - `last_name: string` The last name of the representative. - `mobile_number: string` The mobile phone number of the representative. - `name: string` - `relationship: object { control, owner, primary, 2 more }` - `control: boolean` Whether the representative has significant responsibility to control, manage, or direct the organization. One representative must be identified under the control prong for each legal entity. - `owner: boolean` Whether the representative owns any percentage of of the equity interests of the legal entity. - `primary: boolean` Whether the person is authorized as the primary representative of the account. This is the person chosen by the business to provide information about themselves, general information about the account, and who consented to the services agreement. There can be only one primary representative for an account at a time. - `percent_ownership: optional number` The percentage of ownership the representative has. Required if 'Owner' is true. - `title: optional string` The job title of the representative. - `ssn_last4: string` The last 4 digits of the representative's Social Security Number. - `status: "created" or "onboarding" or "active" or 2 more` The current status of the representative. - `"created"` - `"onboarding"` - `"active"` - `"rejected"` - `"inactive"` - `status_detail: object { code, message, reason, source }` - `code: string` A machine-readable code for the specific status, useful for programmatic handling. - `message: string` A human-readable message describing the current status. - `reason: "unverified" or "in_review" or "pending" or 5 more` A machine-readable identifier for the specific status, useful for programmatic handling. - `"unverified"` - `"in_review"` - `"pending"` - `"stuck"` - `"verified"` - `"failed_verification"` - `"disabled"` - `"new"` - `source: "watchtower"` Identifies the origin of the status change (e.g., `watchtower`). This helps in tracking the cause of status updates. - `"watchtower"` - `updated_at: string` Timestamp of the most recent update to the representative. - `external_id: optional string` Unique identifier for the representative in your database, used for cross-referencing between Straddle and your systems. - `metadata: optional map[string]` Up to 20 additional user-defined key-value pairs. Useful for storing additional information about the represetative in a structured format. - `phone: optional string` - `user_id: optional string` The unique identifier of the user account associated with this representative, if applicable. - `meta: object { api_request_id, api_request_timestamp }` Metadata about the API request, including an identifier and timestamp. - `api_request_id: string` Unique identifier for this API request, useful for troubleshooting. - `api_request_timestamp: string` Timestamp for this API request, useful for troubleshooting. - `response_type: "object" or "array" or "error" or "none"` 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. - `"object"` - `"array"` - `"error"` - `"none"` ### Example ```cli straddle embed:representatives get \ --api-key 'My API Key' \ --representative-id 182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e ``` #### Response ```json { "data": { "id": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", "account_id": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", "created_at": "2019-12-27T18:11:19.117Z", "dob": "1980-01-01", "email": "ron.swanson@pawnee.com", "first_name": "Ron", "last_name": "Swanson", "mobile_number": "+12128675309", "name": "name", "relationship": { "control": true, "owner": true, "primary": true, "percent_ownership": 0, "title": "title" }, "ssn_last4": "1234", "status": "created", "status_detail": { "code": "code", "message": "message", "reason": "unverified", "source": "watchtower" }, "updated_at": "2019-12-27T18:11:19.117Z", "external_id": "external_id", "metadata": { "foo": "string" }, "phone": "phone", "user_id": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e" }, "meta": { "api_request_id": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", "api_request_timestamp": "2019-12-27T18:11:19.117Z" }, "response_type": "object" } ``` ## Retrieve unmasked representative details `$ straddle embed:representatives unmask` **get** `/v1/representatives/{representative_id}/unmask` Retrieves the unmasked details of a representative that has previously been created. Supply the unique representative ID, and Straddle will return the corresponding representative information, including sensitive details. This endpoint requires additional authentication and should be used with caution. ### Parameters - `--representative-id: string` - `--correlation-id: optional string` Optional client generated identifier to trace and debug a series of requests. - `--request-id: optional string` Optional client generated identifier to trace and debug a request. ### Returns - `representative: object { data, meta, response_type }` - `data: object { id, account_id, created_at, 15 more }` - `id: string` Unique identifier for the representative. - `account_id: string` The unique identifier of the account this representative is associated with. - `created_at: string` Timestamp of when the representative was created. - `dob: string` The date of birth of the representative, in ISO 8601 format (YYYY-MM-DD). - `email: string` The email address of the representative. - `first_name: string` The first name of the representative. - `last_name: string` The last name of the representative. - `mobile_number: string` The mobile phone number of the representative. - `name: string` - `relationship: object { control, owner, primary, 2 more }` - `control: boolean` Whether the representative has significant responsibility to control, manage, or direct the organization. One representative must be identified under the control prong for each legal entity. - `owner: boolean` Whether the representative owns any percentage of of the equity interests of the legal entity. - `primary: boolean` Whether the person is authorized as the primary representative of the account. This is the person chosen by the business to provide information about themselves, general information about the account, and who consented to the services agreement. There can be only one primary representative for an account at a time. - `percent_ownership: optional number` The percentage of ownership the representative has. Required if 'Owner' is true. - `title: optional string` The job title of the representative. - `ssn_last4: string` The last 4 digits of the representative's Social Security Number. - `status: "created" or "onboarding" or "active" or 2 more` The current status of the representative. - `"created"` - `"onboarding"` - `"active"` - `"rejected"` - `"inactive"` - `status_detail: object { code, message, reason, source }` - `code: string` A machine-readable code for the specific status, useful for programmatic handling. - `message: string` A human-readable message describing the current status. - `reason: "unverified" or "in_review" or "pending" or 5 more` A machine-readable identifier for the specific status, useful for programmatic handling. - `"unverified"` - `"in_review"` - `"pending"` - `"stuck"` - `"verified"` - `"failed_verification"` - `"disabled"` - `"new"` - `source: "watchtower"` Identifies the origin of the status change (e.g., `watchtower`). This helps in tracking the cause of status updates. - `"watchtower"` - `updated_at: string` Timestamp of the most recent update to the representative. - `external_id: optional string` Unique identifier for the representative in your database, used for cross-referencing between Straddle and your systems. - `metadata: optional map[string]` Up to 20 additional user-defined key-value pairs. Useful for storing additional information about the represetative in a structured format. - `phone: optional string` - `user_id: optional string` The unique identifier of the user account associated with this representative, if applicable. - `meta: object { api_request_id, api_request_timestamp }` Metadata about the API request, including an identifier and timestamp. - `api_request_id: string` Unique identifier for this API request, useful for troubleshooting. - `api_request_timestamp: string` Timestamp for this API request, useful for troubleshooting. - `response_type: "object" or "array" or "error" or "none"` 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. - `"object"` - `"array"` - `"error"` - `"none"` ### Example ```cli straddle embed:representatives unmask \ --api-key 'My API Key' \ --representative-id 182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e ``` #### Response ```json { "data": { "id": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", "account_id": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", "created_at": "2019-12-27T18:11:19.117Z", "dob": "1980-01-01", "email": "ron.swanson@pawnee.com", "first_name": "Ron", "last_name": "Swanson", "mobile_number": "+12128675309", "name": "name", "relationship": { "control": true, "owner": true, "primary": true, "percent_ownership": 0, "title": "title" }, "ssn_last4": "1234", "status": "created", "status_detail": { "code": "code", "message": "message", "reason": "unverified", "source": "watchtower" }, "updated_at": "2019-12-27T18:11:19.117Z", "external_id": "external_id", "metadata": { "foo": "string" }, "phone": "phone", "user_id": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e" }, "meta": { "api_request_id": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", "api_request_timestamp": "2019-12-27T18:11:19.117Z" }, "response_type": "object" } ``` ## Domain Types ### Representative - `representative: object { data, meta, response_type }` - `data: object { id, account_id, created_at, 15 more }` - `id: string` Unique identifier for the representative. - `account_id: string` The unique identifier of the account this representative is associated with. - `created_at: string` Timestamp of when the representative was created. - `dob: string` The date of birth of the representative, in ISO 8601 format (YYYY-MM-DD). - `email: string` The email address of the representative. - `first_name: string` The first name of the representative. - `last_name: string` The last name of the representative. - `mobile_number: string` The mobile phone number of the representative. - `name: string` - `relationship: object { control, owner, primary, 2 more }` - `control: boolean` Whether the representative has significant responsibility to control, manage, or direct the organization. One representative must be identified under the control prong for each legal entity. - `owner: boolean` Whether the representative owns any percentage of of the equity interests of the legal entity. - `primary: boolean` Whether the person is authorized as the primary representative of the account. This is the person chosen by the business to provide information about themselves, general information about the account, and who consented to the services agreement. There can be only one primary representative for an account at a time. - `percent_ownership: optional number` The percentage of ownership the representative has. Required if 'Owner' is true. - `title: optional string` The job title of the representative. - `ssn_last4: string` The last 4 digits of the representative's Social Security Number. - `status: "created" or "onboarding" or "active" or 2 more` The current status of the representative. - `"created"` - `"onboarding"` - `"active"` - `"rejected"` - `"inactive"` - `status_detail: object { code, message, reason, source }` - `code: string` A machine-readable code for the specific status, useful for programmatic handling. - `message: string` A human-readable message describing the current status. - `reason: "unverified" or "in_review" or "pending" or 5 more` A machine-readable identifier for the specific status, useful for programmatic handling. - `"unverified"` - `"in_review"` - `"pending"` - `"stuck"` - `"verified"` - `"failed_verification"` - `"disabled"` - `"new"` - `source: "watchtower"` Identifies the origin of the status change (e.g., `watchtower`). This helps in tracking the cause of status updates. - `"watchtower"` - `updated_at: string` Timestamp of the most recent update to the representative. - `external_id: optional string` Unique identifier for the representative in your database, used for cross-referencing between Straddle and your systems. - `metadata: optional map[string]` Up to 20 additional user-defined key-value pairs. Useful for storing additional information about the represetative in a structured format. - `phone: optional string` - `user_id: optional string` The unique identifier of the user account associated with this representative, if applicable. - `meta: object { api_request_id, api_request_timestamp }` Metadata about the API request, including an identifier and timestamp. - `api_request_id: string` Unique identifier for this API request, useful for troubleshooting. - `api_request_timestamp: string` Timestamp for this API request, useful for troubleshooting. - `response_type: "object" or "array" or "error" or "none"` 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. - `"object"` - `"array"` - `"error"` - `"none"` ### Representative Paged - `representativePaged: object { data, meta, response_type }` - `data: array of object { id, account_id, created_at, 15 more }` - `id: string` Unique identifier for the representative. - `account_id: string` The unique identifier of the account this representative is associated with. - `created_at: string` Timestamp of when the representative was created. - `dob: string` The date of birth of the representative, in ISO 8601 format (YYYY-MM-DD). - `email: string` The email address of the representative. - `first_name: string` The first name of the representative. - `last_name: string` The last name of the representative. - `mobile_number: string` The mobile phone number of the representative. - `name: string` - `relationship: object { control, owner, primary, 2 more }` - `control: boolean` Whether the representative has significant responsibility to control, manage, or direct the organization. One representative must be identified under the control prong for each legal entity. - `owner: boolean` Whether the representative owns any percentage of of the equity interests of the legal entity. - `primary: boolean` Whether the person is authorized as the primary representative of the account. This is the person chosen by the business to provide information about themselves, general information about the account, and who consented to the services agreement. There can be only one primary representative for an account at a time. - `percent_ownership: optional number` The percentage of ownership the representative has. Required if 'Owner' is true. - `title: optional string` The job title of the representative. - `ssn_last4: string` The last 4 digits of the representative's Social Security Number. - `status: "created" or "onboarding" or "active" or 2 more` The current status of the representative. - `"created"` - `"onboarding"` - `"active"` - `"rejected"` - `"inactive"` - `status_detail: object { code, message, reason, source }` - `code: string` A machine-readable code for the specific status, useful for programmatic handling. - `message: string` A human-readable message describing the current status. - `reason: "unverified" or "in_review" or "pending" or 5 more` A machine-readable identifier for the specific status, useful for programmatic handling. - `"unverified"` - `"in_review"` - `"pending"` - `"stuck"` - `"verified"` - `"failed_verification"` - `"disabled"` - `"new"` - `source: "watchtower"` Identifies the origin of the status change (e.g., `watchtower`). This helps in tracking the cause of status updates. - `"watchtower"` - `updated_at: string` Timestamp of the most recent update to the representative. - `external_id: optional string` Unique identifier for the representative in your database, used for cross-referencing between Straddle and your systems. - `metadata: optional map[string]` Up to 20 additional user-defined key-value pairs. Useful for storing additional information about the represetative in a structured format. - `phone: optional string` - `user_id: optional string` The unique identifier of the user account associated with this representative, if applicable. - `meta: object { api_request_id, api_request_timestamp, max_page_size, 6 more }` Metadata about the API request, including an identifier, timestamp, and pagination details. - `api_request_id: string` Unique identifier for this API request, useful for troubleshooting. - `api_request_timestamp: string` Timestamp for this API request, useful for troubleshooting. - `max_page_size: number` Maximum allowed page size for this endpoint. - `page_number: number` Page number for paginated results. - `page_size: number` Number of items per page in this response. - `sort_by: string` The field that the results were sorted by. - `sort_order: "asc" or "desc"` - `"asc"` - `"desc"` - `total_items: number` Total number of items returned in this response. - `total_pages: number` The number of pages available. - `response_type: "object" or "array" or "error" or "none"` 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. - `"object"` - `"array"` - `"error"` - `"none"`