> This page is for Enterprise.

> For clean Markdown of any page, append .md to the page URL.
> For a complete documentation index, see https://citi-demo.ferndocs.com/llms.txt.
> For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://citi-demo.ferndocs.com/_mcp/server.

# Create Payment Account Statements

POST https:/tts.apib2b.citi.com/citiconnect/prod/accountreporting/v2/statement
Content-Type: application/json

The Statement endpoint follows XML and JSON format. The response from this endpoint returns a `statementId`. This identifier must then be used to map the statement received as part of push notification.  **Note:** Statement generation may require some time to be processed. The time needed to produce statements depends on the size of the statement file. This process may take anywhere from 15 seconds to a few minutes before the statement is generated. Once generated, the statement will be shared through a push notification and can be mapped with a `statementId`. Content-Type: Supports “application/XML” and “application/JSON”. Authorization: The OAuth Token prefixed with “Bearer“ and space in between.

Reference: https://citi-demo.ferndocs.com/enterprises/api-reference/account-services/statements-api/statements/initiate-statement

## Authentication

- `Authorization` header (bearer token, required) — All CitiConnect APIs use the oAuth2 authentication scheme, which requires a bearer token to authenticate your API call. The Token URL includes the version of authentication used by this API. See the Citi Authentication API reference for information on requesting a token.

## Servers

- `https:/tts.apib2b.citi.com/citiconnect/prod` (Production Gateway URL, default)
- `https:/tts.sandbox.apib2b.citi.com/citiconnect/sb` (Sandbox URL)

## Request

### Headers

- `Authorization` (string, required) — The OAuth Token prefixed with "Bearer" and space in between.

### Body (application/json)

This endpoint expects a StatementRequest.

- `accountNumber` (list of string, required) — The account number(s) for which the account statement is to be retrieved. You can specify multiple accounts by using multiple account objects. If no value is sent the Statements API will send a reject response with an error message.
- `formatName` (enum, required) — Specifies the format of the statement(s) to be generated. The types of statements available to request are - \* SWIFT\_MT940 - End of day account statement in Standard SWIFT proprietary format. \* CAMT\_053\_001\_02 - End of day account statement in ISO20022 Standard XML format. \* SWIFT\_MT942 - Intraday account statement in Standard SWIFT proprietary format. \* CAMT\_052\_001\_02 - Intraday account statement in ISO20022 Standard XML format. **Note:** `formatName` will be ignored if `templateName` is supplied, but `formatName` is still required for completeness.
  - Allowed values: `SWIFT_MT940`, `CAMT_053_001_02`, `SWIFT_MT942`, `CAMT_052_001_02`
- `fromDate` (datetime, required) — Specifies the beginning date and time for the statement generation request. ``fromDate`` uses _YYYY-MM-DDTHH:MM:SS.sssZ_ format.
- `toDate` (datetime, required) — Specifies the ending date for the statement generation request. ``toDate`` uses _YYYY-MM-DDTHH:MM:SS.sssZ_ format.
- `strLibrayName` (string, optional) — Specifies the STR Library name created as part of STR profile by the Citi representative, if itemization data is required.
- `templateName` (string, optional) — The template name, as defined in CitiDirect BE File Services (STR Library Number). Before you make your first statement API request, make sure that the correct template (also known as an 'export profile') has been set up using CitiDirect BE. For help setting up a template contact your Citi representative. The template contains the following: \* the format standard \* the list of transaction codes and descriptions \* the display of itemized entries for bulk debits \* the list of the date and time stamps You can choose between: \* Detailed itemized entries - list all transactions on the statement. If you would like an itemized Statement Retrieval (STR), please contact your Citi representative to perform the setup on your behalf. You must then use the STR library Name in your statement initiation request. \* A single consolidated debit entry - one debit entry that can contain several smaller transactions. These are also known as bulk debit transactions. When creating the template, the time zone where the template is initially set up will be used when generating the account statement as well as the frequency and interval specified.
- `xmlns` (string, optional)

## Response

### 202

Accepted

- `statementId` (string, required) — Unique ID for newly generated statement. This will be used to map with the statement file.
- `xmlns` (string, optional)

## Errors

### 400 Bad Request Error

Bad Request

- `httpCode` (integer, required) — Http Code for the message.
- `httpMessage` (string, optional) — Http message associated with the code.
- `moreInformation` (string, optional) — Additional information along with the Http code and message.

### 401 Unauthorized Error

Unauthorized

- `httpCode` (integer, required) — Http Code for the message.
- `httpMessage` (string, optional) — Http message associated with the code.
- `moreInformation` (string, optional) — Additional information along with the Http code and message.

### 404 Not Found Error

Not Found

- `httpCode` (integer, required) — Http Code for the message.
- `httpMessage` (string, optional) — Http message associated with the code.
- `moreInformation` (string, optional) — Additional information along with the Http code and message.

### 405 Method Not Allowed Error

Method Not Allowed

- `httpCode` (integer, required) — Http Code for the message.
- `httpMessage` (string, optional) — Http message associated with the code.
- `moreInformation` (string, optional) — Additional information along with the Http code and message.

### 415 Unsupported Media Type Error

Unsupported Media Type

- `httpCode` (integer, required) — Http Code for the message.
- `httpMessage` (string, optional) — Http message associated with the code.
- `moreInformation` (string, optional) — Additional information along with the Http code and message.

### 500 Internal Server Error

Internal Server Error

- `httpCode` (integer, required) — Http Code for the message.
- `httpMessage` (string, optional) — Http message associated with the code.
- `moreInformation` (string, optional) — Additional information along with the Http code and message.

## Examples

**Request**

```json
{
  "accountNumber": [
    "12345",
    "34567"
  ],
  "formatName": "CAMT_053_001_02",
  "fromDate": "2017-04-02T02:02:02.222Z",
  "toDate": "2017-04-02T02:02:02.222Z",
  "strLibrayName": "STR API 920",
  "templateName": "API_TEMPLATE"
}
```

**Response**

```json
{
  "statementId": "45227678"
}
```

**SDK Code**

```python Statement-Request-Example (application/json)
import requests

url = "https://https/tts.apib2b.citi.com/citiconnect/prod/accountreporting/v2/statement"

payload = {
    "accountNumber": ["12345", "34567"],
    "formatName": "CAMT_053_001_02",
    "fromDate": "2017-04-02T02:02:02.222Z",
    "toDate": "2017-04-02T02:02:02.222Z",
    "strLibrayName": "STR API 920",
    "templateName": "API_TEMPLATE"
}
headers = {
    "Authorization": "Bearer <token>",
    "Content-Type": "application/json"
}

response = requests.post(url, json=payload, headers=headers)

print(response.json())
```

```javascript Statement-Request-Example (application/json)
const url = 'https://https/tts.apib2b.citi.com/citiconnect/prod/accountreporting/v2/statement';
const options = {
  method: 'POST',
  headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
  body: '{"accountNumber":["12345","34567"],"formatName":"CAMT_053_001_02","fromDate":"2017-04-02T02:02:02.222Z","toDate":"2017-04-02T02:02:02.222Z","strLibrayName":"STR API 920","templateName":"API_TEMPLATE"}'
};

try {
  const response = await fetch(url, options);
  const data = await response.json();
  console.log(data);
} catch (error) {
  console.error(error);
}
```

```go Statement-Request-Example (application/json)
package main

import (
	"fmt"
	"strings"
	"net/http"
	"io"
)

func main() {

	url := "https://https/tts.apib2b.citi.com/citiconnect/prod/accountreporting/v2/statement"

	payload := strings.NewReader("{\n  \"accountNumber\": [\n    \"12345\",\n    \"34567\"\n  ],\n  \"formatName\": \"CAMT_053_001_02\",\n  \"fromDate\": \"2017-04-02T02:02:02.222Z\",\n  \"toDate\": \"2017-04-02T02:02:02.222Z\",\n  \"strLibrayName\": \"STR API 920\",\n  \"templateName\": \"API_TEMPLATE\"\n}")

	req, _ := http.NewRequest("POST", url, payload)

	req.Header.Add("Authorization", "Bearer <token>")
	req.Header.Add("Content-Type", "application/json")

	res, _ := http.DefaultClient.Do(req)

	defer res.Body.Close()
	body, _ := io.ReadAll(res.Body)

	fmt.Println(res)
	fmt.Println(string(body))

}
```

```ruby Statement-Request-Example (application/json)
require 'uri'
require 'net/http'

url = URI("https://https/tts.apib2b.citi.com/citiconnect/prod/accountreporting/v2/statement")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n  \"accountNumber\": [\n    \"12345\",\n    \"34567\"\n  ],\n  \"formatName\": \"CAMT_053_001_02\",\n  \"fromDate\": \"2017-04-02T02:02:02.222Z\",\n  \"toDate\": \"2017-04-02T02:02:02.222Z\",\n  \"strLibrayName\": \"STR API 920\",\n  \"templateName\": \"API_TEMPLATE\"\n}"

response = http.request(request)
puts response.read_body
```

```java Statement-Request-Example (application/json)
import com.mashape.unirest.http.HttpResponse;
import com.mashape.unirest.http.Unirest;

HttpResponse<String> response = Unirest.post("https://https/tts.apib2b.citi.com/citiconnect/prod/accountreporting/v2/statement")
  .header("Authorization", "Bearer <token>")
  .header("Content-Type", "application/json")
  .body("{\n  \"accountNumber\": [\n    \"12345\",\n    \"34567\"\n  ],\n  \"formatName\": \"CAMT_053_001_02\",\n  \"fromDate\": \"2017-04-02T02:02:02.222Z\",\n  \"toDate\": \"2017-04-02T02:02:02.222Z\",\n  \"strLibrayName\": \"STR API 920\",\n  \"templateName\": \"API_TEMPLATE\"\n}")
  .asString();
```

```php Statement-Request-Example (application/json)
<?php
require_once('vendor/autoload.php');

$client = new \GuzzleHttp\Client();

$response = $client->request('POST', 'https://https/tts.apib2b.citi.com/citiconnect/prod/accountreporting/v2/statement', [
  'body' => '{
  "accountNumber": [
    "12345",
    "34567"
  ],
  "formatName": "CAMT_053_001_02",
  "fromDate": "2017-04-02T02:02:02.222Z",
  "toDate": "2017-04-02T02:02:02.222Z",
  "strLibrayName": "STR API 920",
  "templateName": "API_TEMPLATE"
}',
  'headers' => [
    'Authorization' => 'Bearer <token>',
    'Content-Type' => 'application/json',
  ],
]);

echo $response->getBody();
```

```csharp Statement-Request-Example (application/json)
using RestSharp;

var client = new RestClient("https://https/tts.apib2b.citi.com/citiconnect/prod/accountreporting/v2/statement");
var request = new RestRequest(Method.POST);
request.AddHeader("Authorization", "Bearer <token>");
request.AddHeader("Content-Type", "application/json");
request.AddParameter("application/json", "{\n  \"accountNumber\": [\n    \"12345\",\n    \"34567\"\n  ],\n  \"formatName\": \"CAMT_053_001_02\",\n  \"fromDate\": \"2017-04-02T02:02:02.222Z\",\n  \"toDate\": \"2017-04-02T02:02:02.222Z\",\n  \"strLibrayName\": \"STR API 920\",\n  \"templateName\": \"API_TEMPLATE\"\n}", ParameterType.RequestBody);
IRestResponse response = client.Execute(request);
```

```swift Statement-Request-Example (application/json)
import Foundation

let headers = [
  "Authorization": "Bearer <token>",
  "Content-Type": "application/json"
]
let parameters = [
  "accountNumber": ["12345", "34567"],
  "formatName": "CAMT_053_001_02",
  "fromDate": "2017-04-02T02:02:02.222Z",
  "toDate": "2017-04-02T02:02:02.222Z",
  "strLibrayName": "STR API 920",
  "templateName": "API_TEMPLATE"
] as [String : Any]

let postData = JSONSerialization.data(withJSONObject: parameters, options: [])

let request = NSMutableURLRequest(url: NSURL(string: "https://https/tts.apib2b.citi.com/citiconnect/prod/accountreporting/v2/statement")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "POST"
request.allHTTPHeaderFields = headers
request.httpBody = postData as Data

let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
  if (error != nil) {
    print(error as Any)
  } else {
    let httpResponse = response as? HTTPURLResponse
    print(httpResponse)
  }
})

dataTask.resume()
```