import os
from syllable_sdk import SyllableSDK
with SyllableSDK(
api_key_header=os.getenv("SYLLABLESDK_API_KEY_HEADER", ""),
) as ss_client:
res = ss_client.organizations.create(request={
"logo": {
"file_name": "example.file",
"content": open("example.file", "rb"),
},
"display_name": "My Great Org",
"description": "An organization that does great things with agentic AI",
"domains": "mygreatorg.com,mygreatorg.org",
})
# Handle response
print(res)
{
"display_name": "My Great Org",
"description": "An organization that does great things with agentic AI.",
"domains": "mygreatorg.com,myothergreatorg.org",
"id": 1,
"last_updated_comments": "Updated to add an additional domain",
"slug": "my-great-org",
"last_updated": "2023-11-07T05:31:56Z",
"last_updated_by": "<string>",
"logo_str": "<string>"
}
Create a new organization.
import os
from syllable_sdk import SyllableSDK
with SyllableSDK(
api_key_header=os.getenv("SYLLABLESDK_API_KEY_HEADER", ""),
) as ss_client:
res = ss_client.organizations.create(request={
"logo": {
"file_name": "example.file",
"content": open("example.file", "rb"),
},
"display_name": "My Great Org",
"description": "An organization that does great things with agentic AI",
"domains": "mygreatorg.com,mygreatorg.org",
})
# Handle response
print(res)
{
"display_name": "My Great Org",
"description": "An organization that does great things with agentic AI.",
"domains": "mygreatorg.com,myothergreatorg.org",
"id": 1,
"last_updated_comments": "Updated to add an additional domain",
"slug": "my-great-org",
"last_updated": "2023-11-07T05:31:56Z",
"last_updated_by": "<string>",
"logo_str": "<string>"
}
Successful Response
The response is of type object
.