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

# Update organization

PUT https://api-sandbox.payabli.com/api/Organization/{orgId}
Content-Type: application/json

Updates an organization's details by ID.

Reference: https://beta-docs.payabli.com/api-reference/organization/update-organization

## Authentication

- `requestToken` header (required) — API Key authentication via header

## Servers

- `https://api-sandbox.payabli.com/api` (Sandbox, default)
- `https://api.payabli.com/api` (Production)

## Request

### Path parameters

- `orgId` (integer, required) — The numeric identifier for organization, assigned by Payabli.

### Body (application/json)

This endpoint expects an object.

- `services` (list of ServiceCost, optional)
- `billingInfo` (Instrument, optional)
- `contacts` (list of Contacts, optional) — List of contacts.
- `hasBilling` (boolean, optional)
- `hasResidual` (boolean, optional)
- `orgAddress` (string, optional) — The organization's address.
- `orgCity` (string, optional) — The organization's city.
- `orgCountry` (string, optional) — The organization's country.
- `orgEntryName` (string, optional) — The entryname for the org, in string format. If you leave this blank, Payabli uses the DBA name.
- `orgId` (string, optional) — An alternate ID for the organization, in string format. This can be your internal identifier for an org, and is typically a name, like "My Suborganization".
- `orgLogo` (FileContent, optional) — Contains details about a file. See See [fileObject Object Model](/api-reference/schemas/filecontent) for a complete reference. Max upload size is 30 MB.
- `orgName` (string, optional) — The name of the organization.
- `orgParentId` (long, optional) — The ID of the org's parent organization.
- `orgState` (string, optional) — The organization's state.
- `orgTimezone` (integer, optional) — The org's timezone, in UTC offset. For example, -5 is Eastern time.
- `orgType` (integer, optional) — The organization type. Currently, this must be `0`.
- `orgWebsite` (string, optional) — The organization's website.
- `orgZip` (string, optional) — The organization's ZIP code.
- `replyToEmail` (string, optional) — Email address for organization-level communications, such as messages about why an application was declined. This is required by commerce laws in the US.

## Response

### 200

Success

- `isSuccess` (boolean, optional) — Boolean indicating whether the operation was successful. A `true` value indicates success. A `false` value indicates failure.
- `pageIdentifier` (string, optional) — Auxiliary validation used internally by payment pages and components.
- `responseCode` (integer, optional) — Code for the response. Learn more in [API Response Codes](/api-reference/api-responses).
- `responseData` (Responsedatanonobject, optional) — Returns the organization ID.
- `responseText` (string, optional) — Response text for operation: 'Success' or 'Declined'.

## Errors

### 400 Bad Request Error

Bad request/ invalid data

- `any`

### 401 Unauthorized Error

Unauthorized request.

- `any`

### 400 Bad Request Error

Bad request/ invalid data

- `any`

### 401 Unauthorized Error

Unauthorized request.

- `any`

### 500 Internal Server Error

Internal API Error

- `any`

### 503 Service Unavailable Error

Database connection error

- `isSuccess` (boolean, optional) — Boolean indicating whether the operation was successful. A `true` value indicates success. A `false` value indicates failure.
- `responseData` (map from string to any, optional) — The object containing the response data.
- `responseText` (string, optional) — Response text for operation: 'Success' or 'Declined'.

## Types

### ServiceCost

- `description` (string, optional)
- `enabled` (boolean, optional) — Toggles whether the section or element is enabled.
- `monthlyCost` (double, optional)
- `name` (string, optional)
- `reseller` (boolean, optional)
- `setupCost` (double, optional)
- `txCost` (double, optional)
- `txPercentCost` (double, optional)

### Instrument

- `achAccount` (string, required) — Bank account number.
- `achRouting` (string, required) — ABA/routing number of Bank account.
- `billingAddress` (string, optional) — Billing address.
- `billingCity` (string, optional) — Billing city.
- `billingCountry` (string, optional) — Billing address country.
- `billingState` (string, optional) — Billing state. Must be 2-letter state code for address in US.
- `billingZip` (string, optional) — Billing address ZIP code.

### Contacts

- `contactEmail` (string, optional) — Contact email address.
- `contactName` (string, optional) — Contact name.
- `contactPhone` (string, optional) — Contact phone number.
- `contactTitle` (string, optional) — Contact title.

### FileContent

Contains details about a file. See See [fileObject Object Model](/api-reference/schemas/filecontent) for a complete reference. Max upload size is 30 MB.

- `fContent` (string, optional) — Content of file, Base64-encoded Ignored if furl is specified. Max upload size is 30 MB.
- `filename` (string, optional) — The name of the attached file.
- `ftype` (enum, optional) — The MIME type of the file (if content is provided)
  - Allowed values: `pdf`, `doc`, `docx`, `jpg`, `jpeg`, `png`, `gif`, `txt`
- `furl` (string, optional) — Optional url provided to show or download the file remotely

### Responsedatanonobject

The response data.

## Examples

**Request**

```json
{
  "contacts": [
    {
      "contactEmail": "herman@hermanscoatings.com",
      "contactName": "Herman Martinez",
      "contactPhone": "3055550000",
      "contactTitle": "Owner"
    }
  ],
  "orgAddress": "123 Walnut Street",
  "orgCity": "Johnson City",
  "orgCountry": "US",
  "orgEntryName": "pilgrim-planner",
  "orgId": "123",
  "orgName": "Pilgrim Planner",
  "orgState": "TN",
  "orgTimezone": -5,
  "orgType": 0,
  "orgWebsite": "www.pilgrimageplanner.com",
  "orgZip": "37615"
}
```

**Response**

```json
{
  "isSuccess": true,
  "responseCode": 1,
  "responseData": 2442,
  "responseText": "Success"
}
```

**SDK Code**

```python Example1
import requests

url = "https://api-sandbox.payabli.com/api/Organization/123"

payload = {
    "contacts": [
        {
            "contactEmail": "herman@hermanscoatings.com",
            "contactName": "Herman Martinez",
            "contactPhone": "3055550000",
            "contactTitle": "Owner"
        }
    ],
    "orgAddress": "123 Walnut Street",
    "orgCity": "Johnson City",
    "orgCountry": "US",
    "orgEntryName": "pilgrim-planner",
    "orgId": "123",
    "orgName": "Pilgrim Planner",
    "orgState": "TN",
    "orgTimezone": -5,
    "orgType": 0,
    "orgWebsite": "www.pilgrimageplanner.com",
    "orgZip": "37615"
}
headers = {
    "requestToken": "<apiKey>",
    "Content-Type": "application/json"
}

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

print(response.json())
```

```javascript Example1
const url = 'https://api-sandbox.payabli.com/api/Organization/123';
const options = {
  method: 'PUT',
  headers: {requestToken: '<apiKey>', 'Content-Type': 'application/json'},
  body: '{"contacts":[{"contactEmail":"herman@hermanscoatings.com","contactName":"Herman Martinez","contactPhone":"3055550000","contactTitle":"Owner"}],"orgAddress":"123 Walnut Street","orgCity":"Johnson City","orgCountry":"US","orgEntryName":"pilgrim-planner","orgId":"123","orgName":"Pilgrim Planner","orgState":"TN","orgTimezone":-5,"orgType":0,"orgWebsite":"www.pilgrimageplanner.com","orgZip":"37615"}'
};

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

```go Example1
package main

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

func main() {

	url := "https://api-sandbox.payabli.com/api/Organization/123"

	payload := strings.NewReader("{\n  \"contacts\": [\n    {\n      \"contactEmail\": \"herman@hermanscoatings.com\",\n      \"contactName\": \"Herman Martinez\",\n      \"contactPhone\": \"3055550000\",\n      \"contactTitle\": \"Owner\"\n    }\n  ],\n  \"orgAddress\": \"123 Walnut Street\",\n  \"orgCity\": \"Johnson City\",\n  \"orgCountry\": \"US\",\n  \"orgEntryName\": \"pilgrim-planner\",\n  \"orgId\": \"123\",\n  \"orgName\": \"Pilgrim Planner\",\n  \"orgState\": \"TN\",\n  \"orgTimezone\": -5,\n  \"orgType\": 0,\n  \"orgWebsite\": \"www.pilgrimageplanner.com\",\n  \"orgZip\": \"37615\"\n}")

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

	req.Header.Add("requestToken", "<apiKey>")
	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 Example1
require 'uri'
require 'net/http'

url = URI("https://api-sandbox.payabli.com/api/Organization/123")

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

request = Net::HTTP::Put.new(url)
request["requestToken"] = '<apiKey>'
request["Content-Type"] = 'application/json'
request.body = "{\n  \"contacts\": [\n    {\n      \"contactEmail\": \"herman@hermanscoatings.com\",\n      \"contactName\": \"Herman Martinez\",\n      \"contactPhone\": \"3055550000\",\n      \"contactTitle\": \"Owner\"\n    }\n  ],\n  \"orgAddress\": \"123 Walnut Street\",\n  \"orgCity\": \"Johnson City\",\n  \"orgCountry\": \"US\",\n  \"orgEntryName\": \"pilgrim-planner\",\n  \"orgId\": \"123\",\n  \"orgName\": \"Pilgrim Planner\",\n  \"orgState\": \"TN\",\n  \"orgTimezone\": -5,\n  \"orgType\": 0,\n  \"orgWebsite\": \"www.pilgrimageplanner.com\",\n  \"orgZip\": \"37615\"\n}"

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

```java Example1
import com.mashape.unirest.http.HttpResponse;
import com.mashape.unirest.http.Unirest;

HttpResponse<String> response = Unirest.put("https://api-sandbox.payabli.com/api/Organization/123")
  .header("requestToken", "<apiKey>")
  .header("Content-Type", "application/json")
  .body("{\n  \"contacts\": [\n    {\n      \"contactEmail\": \"herman@hermanscoatings.com\",\n      \"contactName\": \"Herman Martinez\",\n      \"contactPhone\": \"3055550000\",\n      \"contactTitle\": \"Owner\"\n    }\n  ],\n  \"orgAddress\": \"123 Walnut Street\",\n  \"orgCity\": \"Johnson City\",\n  \"orgCountry\": \"US\",\n  \"orgEntryName\": \"pilgrim-planner\",\n  \"orgId\": \"123\",\n  \"orgName\": \"Pilgrim Planner\",\n  \"orgState\": \"TN\",\n  \"orgTimezone\": -5,\n  \"orgType\": 0,\n  \"orgWebsite\": \"www.pilgrimageplanner.com\",\n  \"orgZip\": \"37615\"\n}")
  .asString();
```

```php Example1
<?php
require_once('vendor/autoload.php');

$client = new \GuzzleHttp\Client();

$response = $client->request('PUT', 'https://api-sandbox.payabli.com/api/Organization/123', [
  'body' => '{
  "contacts": [
    {
      "contactEmail": "herman@hermanscoatings.com",
      "contactName": "Herman Martinez",
      "contactPhone": "3055550000",
      "contactTitle": "Owner"
    }
  ],
  "orgAddress": "123 Walnut Street",
  "orgCity": "Johnson City",
  "orgCountry": "US",
  "orgEntryName": "pilgrim-planner",
  "orgId": "123",
  "orgName": "Pilgrim Planner",
  "orgState": "TN",
  "orgTimezone": -5,
  "orgType": 0,
  "orgWebsite": "www.pilgrimageplanner.com",
  "orgZip": "37615"
}',
  'headers' => [
    'Content-Type' => 'application/json',
    'requestToken' => '<apiKey>',
  ],
]);

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

```csharp Example1
using RestSharp;

var client = new RestClient("https://api-sandbox.payabli.com/api/Organization/123");
var request = new RestRequest(Method.PUT);
request.AddHeader("requestToken", "<apiKey>");
request.AddHeader("Content-Type", "application/json");
request.AddParameter("application/json", "{\n  \"contacts\": [\n    {\n      \"contactEmail\": \"herman@hermanscoatings.com\",\n      \"contactName\": \"Herman Martinez\",\n      \"contactPhone\": \"3055550000\",\n      \"contactTitle\": \"Owner\"\n    }\n  ],\n  \"orgAddress\": \"123 Walnut Street\",\n  \"orgCity\": \"Johnson City\",\n  \"orgCountry\": \"US\",\n  \"orgEntryName\": \"pilgrim-planner\",\n  \"orgId\": \"123\",\n  \"orgName\": \"Pilgrim Planner\",\n  \"orgState\": \"TN\",\n  \"orgTimezone\": -5,\n  \"orgType\": 0,\n  \"orgWebsite\": \"www.pilgrimageplanner.com\",\n  \"orgZip\": \"37615\"\n}", ParameterType.RequestBody);
IRestResponse response = client.Execute(request);
```

```swift Example1
import Foundation

let headers = [
  "requestToken": "<apiKey>",
  "Content-Type": "application/json"
]
let parameters = [
  "contacts": [
    [
      "contactEmail": "herman@hermanscoatings.com",
      "contactName": "Herman Martinez",
      "contactPhone": "3055550000",
      "contactTitle": "Owner"
    ]
  ],
  "orgAddress": "123 Walnut Street",
  "orgCity": "Johnson City",
  "orgCountry": "US",
  "orgEntryName": "pilgrim-planner",
  "orgId": "123",
  "orgName": "Pilgrim Planner",
  "orgState": "TN",
  "orgTimezone": -5,
  "orgType": 0,
  "orgWebsite": "www.pilgrimageplanner.com",
  "orgZip": "37615"
] as [String : Any]

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

let request = NSMutableURLRequest(url: NSURL(string: "https://api-sandbox.payabli.com/api/Organization/123")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "PUT"
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()
```