Skip to content
Get started

Unmask a linked bank account

client.Embed.LinkedBankAccounts.Unmask(ctx, linkedBankAccountID, query) (*LinkedBankAccountUnmaskV1, error)
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.

ParametersExpand Collapse
linkedBankAccountID string
query EmbedLinkedBankAccountUnmaskParams
CorrelationID param.Field[string]optional

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

RequestID param.Field[string]optional

Optional client generated identifier to trace and debug a request.

ReturnsExpand Collapse
type LinkedBankAccountUnmaskV1 struct{…}
Data LinkedBankAccountUnmaskV1Data
ID string

Unique identifier for the linked bank account.

formatuuid
AccountID string

Unique identifier for the Straddle account related to this bank account.

formatuuid
BankAccount LinkedBankAccountUnmaskV1DataBankAccount

The bank account details associated with the linked bank account.

AccountHolder string
AccountNumber string
InstitutionName string
RoutingNumber string
CreatedAt Time

Timestamp of when the linked bank account was created.

formatdate-time
Status string

The current status of the linked bank account.

One of the following:
const LinkedBankAccountUnmaskV1DataStatusCreated LinkedBankAccountUnmaskV1DataStatus = "created"
const LinkedBankAccountUnmaskV1DataStatusOnboarding LinkedBankAccountUnmaskV1DataStatus = "onboarding"
const LinkedBankAccountUnmaskV1DataStatusActive LinkedBankAccountUnmaskV1DataStatus = "active"
const LinkedBankAccountUnmaskV1DataStatusRejected LinkedBankAccountUnmaskV1DataStatus = "rejected"
const LinkedBankAccountUnmaskV1DataStatusInactive LinkedBankAccountUnmaskV1DataStatus = "inactive"
const LinkedBankAccountUnmaskV1DataStatusCanceled LinkedBankAccountUnmaskV1DataStatus = "canceled"
StatusDetail LinkedBankAccountUnmaskV1DataStatusDetail

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 string

A machine-readable identifier for the specific status, useful for programmatic handling.

One of the following:
const LinkedBankAccountUnmaskV1DataStatusDetailReasonUnverified LinkedBankAccountUnmaskV1DataStatusDetailReason = "unverified"
const LinkedBankAccountUnmaskV1DataStatusDetailReasonInReview LinkedBankAccountUnmaskV1DataStatusDetailReason = "in_review"
const LinkedBankAccountUnmaskV1DataStatusDetailReasonPending LinkedBankAccountUnmaskV1DataStatusDetailReason = "pending"
const LinkedBankAccountUnmaskV1DataStatusDetailReasonStuck LinkedBankAccountUnmaskV1DataStatusDetailReason = "stuck"
const LinkedBankAccountUnmaskV1DataStatusDetailReasonVerified LinkedBankAccountUnmaskV1DataStatusDetailReason = "verified"
const LinkedBankAccountUnmaskV1DataStatusDetailReasonFailedVerification LinkedBankAccountUnmaskV1DataStatusDetailReason = "failed_verification"
const LinkedBankAccountUnmaskV1DataStatusDetailReasonDisabled LinkedBankAccountUnmaskV1DataStatusDetailReason = "disabled"
const LinkedBankAccountUnmaskV1DataStatusDetailReasonNew LinkedBankAccountUnmaskV1DataStatusDetailReason = "new"
Source string

Identifies the origin of the status change (e.g., watchtower). This helps in tracking the cause of status updates.

UpdatedAt Time

Timestamp of when the linked bank account was last updated.

formatdate-time
Metadata map[string, string]optional

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

APIRequestID string

Unique identifier for this API request, useful for troubleshooting.

formatuuid
APIRequestTimestamp Time

Timestamp for this API request, useful for troubleshooting.

formatdate-time
ResponseType LinkedBankAccountUnmaskV1ResponseType

Indicates the structure of the returned content.

  • "object" means the data field contains a single JSON object.
  • "array" means the data field contains an array of objects.
  • "error" means the data field contains an error object with details of the issue.
  • "none" means no data is returned.
One of the following:
const LinkedBankAccountUnmaskV1ResponseTypeObject LinkedBankAccountUnmaskV1ResponseType = "object"
const LinkedBankAccountUnmaskV1ResponseTypeArray LinkedBankAccountUnmaskV1ResponseType = "array"
const LinkedBankAccountUnmaskV1ResponseTypeError LinkedBankAccountUnmaskV1ResponseType = "error"
const LinkedBankAccountUnmaskV1ResponseTypeNone LinkedBankAccountUnmaskV1ResponseType = "none"

Unmask a linked bank account

package main

import (
  "context"
  "fmt"

  "github.com/straddleio/straddle-go"
  "github.com/straddleio/straddle-go/option"
)

func main() {
  client := straddle.NewClient(
    option.WithAPIKey("My API Key"),
  )
  linkedBankAccountUnmaskV1, err := client.Embed.LinkedBankAccounts.Unmask(
    context.TODO(),
    "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
    straddle.EmbedLinkedBankAccountUnmaskParams{

    },
  )
  if err != nil {
    panic(err.Error())
  }
  fmt.Printf("%+v\n", linkedBankAccountUnmaskV1.Data)
}
{
  "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"
}
Returns Examples
{
  "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"
}