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

# Update Organisation

PUT https://api.staple.io/v1/organisations
Content-Type: application/json

Update the company information of the account.

Reference: https://docs.staple.ai/api-reference/v1/organisations/update-organisation

## OpenAPI Specification

```yaml
openapi: 3.1.0
info:
  title: v1
  version: 1.0.0
paths:
  /v1/organisations:
    put:
      operationId: updateOrganisation
      summary: Update Organisation
      description: Update the company information of the account.
      tags:
        - organisations
      parameters:
        - name: x-api-key
          in: header
          description: API key issued by Staple.
          required: true
          schema:
            type: string
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: >-
                  #/components/schemas/Organisations_updateOrganisation_Response_200
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                info:
                  $ref: >-
                    #/components/schemas/V1OrganisationsPutRequestBodyContentApplicationJsonSchemaInfo
servers:
  - url: https://api.staple.io
    description: https://api.staple.io
components:
  schemas:
    V1OrganisationsPutRequestBodyContentApplicationJsonSchemaInfo:
      type: object
      properties:
        name:
          type: string
        address:
          type: string
        country:
          type: string
        postCode:
          type: string
        phoneNumber:
          type: string
        businessCode:
          type: string
        email:
          type: string
      title: V1OrganisationsPutRequestBodyContentApplicationJsonSchemaInfo
    Organisations_updateOrganisation_Response_200:
      type: object
      properties: {}
      description: Empty response body
      title: Organisations_updateOrganisation_Response_200
  securitySchemes:
    apiKeyAuth:
      type: apiKey
      in: header
      name: x-api-key
      description: API key issued by Staple.
    bearerAuth:
      type: http
      scheme: bearer
      description: JWT obtained from the login endpoint.

```

## Examples

### Update Organisation



**Request**

```json
undefined
```

**Response**

```json
{
  "updateCompanyInfo": {
    "message": "Updated company information successfully."
  }
}
```

**SDK Code**

```python Update Organisation
import requests

url = "https://api.staple.io/v1/organisations"

headers = {
    "x-api-key": "<apiKey>",
    "Content-Type": "application/json"
}

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

print(response.json())
```

```javascript Update Organisation
const url = 'https://api.staple.io/v1/organisations';
const options = {
  method: 'PUT',
  headers: {'x-api-key': '<apiKey>', 'Content-Type': 'application/json'},
  body: undefined
};

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

```go Update Organisation
package main

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

func main() {

	url := "https://api.staple.io/v1/organisations"

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

	req.Header.Add("x-api-key", "<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 Update Organisation
require 'uri'
require 'net/http'

url = URI("https://api.staple.io/v1/organisations")

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

request = Net::HTTP::Put.new(url)
request["x-api-key"] = '<apiKey>'
request["Content-Type"] = 'application/json'

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

```java Update Organisation
import com.mashape.unirest.http.HttpResponse;
import com.mashape.unirest.http.Unirest;

HttpResponse<String> response = Unirest.put("https://api.staple.io/v1/organisations")
  .header("x-api-key", "<apiKey>")
  .header("Content-Type", "application/json")
  .asString();
```

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

$client = new \GuzzleHttp\Client();

$response = $client->request('PUT', 'https://api.staple.io/v1/organisations', [
  'headers' => [
    'Content-Type' => 'application/json',
    'x-api-key' => '<apiKey>',
  ],
]);

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

```csharp Update Organisation
using RestSharp;

var client = new RestClient("https://api.staple.io/v1/organisations");
var request = new RestRequest(Method.PUT);
request.AddHeader("x-api-key", "<apiKey>");
request.AddHeader("Content-Type", "application/json");
IRestResponse response = client.Execute(request);
```

```swift Update Organisation
import Foundation

let headers = [
  "x-api-key": "<apiKey>",
  "Content-Type": "application/json"
]

let request = NSMutableURLRequest(url: NSURL(string: "https://api.staple.io/v1/organisations")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "PUT"
request.allHTTPHeaderFields = headers

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()
```

### Organisations_updateOrganisation_example



**Request**

```json
{
  "info": {
    "name": "Organisation",
    "address": "Duong Quang Ham, Go Vap",
    "country": "VN",
    "postCode": "70000",
    "phoneNumber": "099999999",
    "businessCode": "ORGCODE",
    "email": "Organisation@staple.io"
  }
}
```

**Response**

```json
{
  "updateCompanyInfo": {
    "message": "Updated company information successfully."
  }
}
```

**SDK Code**

```python Organisations_updateOrganisation_example
import requests

url = "https://api.staple.io/v1/organisations"

payload = { "info": {
        "name": "Organisation",
        "address": "Duong Quang Ham, Go Vap",
        "country": "VN",
        "postCode": "70000",
        "phoneNumber": "099999999",
        "businessCode": "ORGCODE",
        "email": "Organisation@staple.io"
    } }
headers = {
    "x-api-key": "<apiKey>",
    "Content-Type": "application/json"
}

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

print(response.json())
```

```javascript Organisations_updateOrganisation_example
const url = 'https://api.staple.io/v1/organisations';
const options = {
  method: 'PUT',
  headers: {'x-api-key': '<apiKey>', 'Content-Type': 'application/json'},
  body: '{"info":{"name":"Organisation","address":"Duong Quang Ham, Go Vap","country":"VN","postCode":"70000","phoneNumber":"099999999","businessCode":"ORGCODE","email":"Organisation@staple.io"}}'
};

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

```go Organisations_updateOrganisation_example
package main

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

func main() {

	url := "https://api.staple.io/v1/organisations"

	payload := strings.NewReader("{\n  \"info\": {\n    \"name\": \"Organisation\",\n    \"address\": \"Duong Quang Ham, Go Vap\",\n    \"country\": \"VN\",\n    \"postCode\": \"70000\",\n    \"phoneNumber\": \"099999999\",\n    \"businessCode\": \"ORGCODE\",\n    \"email\": \"Organisation@staple.io\"\n  }\n}")

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

	req.Header.Add("x-api-key", "<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 Organisations_updateOrganisation_example
require 'uri'
require 'net/http'

url = URI("https://api.staple.io/v1/organisations")

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

request = Net::HTTP::Put.new(url)
request["x-api-key"] = '<apiKey>'
request["Content-Type"] = 'application/json'
request.body = "{\n  \"info\": {\n    \"name\": \"Organisation\",\n    \"address\": \"Duong Quang Ham, Go Vap\",\n    \"country\": \"VN\",\n    \"postCode\": \"70000\",\n    \"phoneNumber\": \"099999999\",\n    \"businessCode\": \"ORGCODE\",\n    \"email\": \"Organisation@staple.io\"\n  }\n}"

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

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

HttpResponse<String> response = Unirest.put("https://api.staple.io/v1/organisations")
  .header("x-api-key", "<apiKey>")
  .header("Content-Type", "application/json")
  .body("{\n  \"info\": {\n    \"name\": \"Organisation\",\n    \"address\": \"Duong Quang Ham, Go Vap\",\n    \"country\": \"VN\",\n    \"postCode\": \"70000\",\n    \"phoneNumber\": \"099999999\",\n    \"businessCode\": \"ORGCODE\",\n    \"email\": \"Organisation@staple.io\"\n  }\n}")
  .asString();
```

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

$client = new \GuzzleHttp\Client();

$response = $client->request('PUT', 'https://api.staple.io/v1/organisations', [
  'body' => '{
  "info": {
    "name": "Organisation",
    "address": "Duong Quang Ham, Go Vap",
    "country": "VN",
    "postCode": "70000",
    "phoneNumber": "099999999",
    "businessCode": "ORGCODE",
    "email": "Organisation@staple.io"
  }
}',
  'headers' => [
    'Content-Type' => 'application/json',
    'x-api-key' => '<apiKey>',
  ],
]);

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

```csharp Organisations_updateOrganisation_example
using RestSharp;

var client = new RestClient("https://api.staple.io/v1/organisations");
var request = new RestRequest(Method.PUT);
request.AddHeader("x-api-key", "<apiKey>");
request.AddHeader("Content-Type", "application/json");
request.AddParameter("application/json", "{\n  \"info\": {\n    \"name\": \"Organisation\",\n    \"address\": \"Duong Quang Ham, Go Vap\",\n    \"country\": \"VN\",\n    \"postCode\": \"70000\",\n    \"phoneNumber\": \"099999999\",\n    \"businessCode\": \"ORGCODE\",\n    \"email\": \"Organisation@staple.io\"\n  }\n}", ParameterType.RequestBody);
IRestResponse response = client.Execute(request);
```

```swift Organisations_updateOrganisation_example
import Foundation

let headers = [
  "x-api-key": "<apiKey>",
  "Content-Type": "application/json"
]
let parameters = ["info": [
    "name": "Organisation",
    "address": "Duong Quang Ham, Go Vap",
    "country": "VN",
    "postCode": "70000",
    "phoneNumber": "099999999",
    "businessCode": "ORGCODE",
    "email": "Organisation@staple.io"
  ]] as [String : Any]

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

let request = NSMutableURLRequest(url: NSURL(string: "https://api.staple.io/v1/organisations")! 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()
```