The YCloud API is organized around REST. Our API is designed to have predictable, resource-oriented URLs, return JSON responses, and use standard HTTP response codes and verbs.
- API version: v2
- Package version: 1.15.7
Install the following dependencies:
go get golang.org/x/oauth2
go get golang.org/x/net/context
go get github.com/ycloud-developers/ycloud-sdk-goAdd the following in import:
import ycloud "github.com/ycloud-developers/ycloud-sdk-go"All URIs are relative to https://api.ycloud.com/v2
| Class | Method | HTTP request | Description |
|---|---|---|---|
| BalanceApi | Retrieve | Get /balance | Retrieve balance |
| ContactsApi | AttributesList | Get /contact/contacts/attributes | List contact attributes |
| ContactsApi | Create | Post /contact/contacts | Create a contact |
| ContactsApi | Delete | Delete /contact/contacts/{id} | Delete a contact |
| ContactsApi | List | Get /contact/contacts | List contacts |
| ContactsApi | Retrieve | Get /contact/contacts/{id} | Retrieve a contact |
| ContactsApi | Update | Patch /contact/contacts/{id} | Update a contact |
| CustomEventsApi | CreateDefinition | Post /event/definitions | Create an event definition |
| CustomEventsApi | CreatePropertyDefinition | Post /event/definitions/{name}/properties | Create an event property definition |
| CustomEventsApi | PropertyDefinition | Delete /event/definitions/{name}/properties/{propertyName} | Delete an event property definition |
| CustomEventsApi | PropertyDefinition_0 | Patch /event/definitions/{name}/properties/{propertyName} | Update an event property definition |
| CustomEventsApi | RetrieveDefinition | Get /event/definitions/{name} | Retrieve an event definition |
| CustomEventsApi | SendEvent | Post /event/events | Send an event |
| CustomEventsApi | UpdateDefinition | Patch /event/definitions/{name} | Update an event definition |
| EmailsApi | Send | Post /emails | Send an email |
| SmsApi | List | Get /sms | List SMS records |
| SmsApi | Send | Post /sms | Send an SMS |
| UnsubscribersApi | Create | Post /unsubscribers | Create an unsubscriber |
| UnsubscribersApi | DeleteByCustomerAndChannel | Delete /unsubscribers/{customer}/{channel} | Delete an unsubscriber |
| UnsubscribersApi | List | Get /unsubscribers | List unsubscribers |
| UnsubscribersApi | ListAllByCustomer | Get /unsubscribers/{customer} | List all unsubscribers by customer |
| UnsubscribersApi | RetrieveByCustomerAndChannel | Get /unsubscribers/{customer}/{channel} | Retrieve an unsubscriber |
| VerifyApi | Check | Post /verify/verificationChecks | Check a verification |
| VerifyApi | Send | Post /verify/verifications | Start a verification |
| VoicesApi | List | Get /voices | List voice records |
| VoicesApi | Send | Post /voices | Send a voice code |
| WebhookEndpointsApi | Create | Post /webhookEndpoints | Create a webhook endpoint |
| WebhookEndpointsApi | Delete | Delete /webhookEndpoints/{id} | Delete a webhook endpoint |
| WebhookEndpointsApi | List | Get /webhookEndpoints | List webhook endpoints |
| WebhookEndpointsApi | Retrieve | Get /webhookEndpoints/{id} | Retrieve a webhook endpoint |
| WebhookEndpointsApi | RotateSecret | Post /webhookEndpoints/{id}/rotateSecret | Rotate a webhook endpoint secret |
| WebhookEndpointsApi | Update | Patch /webhookEndpoints/{id} | Update a webhook endpoint |
| WhatsappBusinessAccountsApi | List | Get /whatsapp/businessAccounts | List WABAs |
| WhatsappBusinessAccountsApi | Retrieve | Get /whatsapp/businessAccounts/{id} | Retrieve a WABA |
| WhatsappCallingApi | Accept | Post /whatsapp/calls/accept | Accept a call |
| WhatsappCallingApi | Connect | Post /whatsapp/calls/connect | Connect a call |
| WhatsappCallingApi | PreAccept | Post /whatsapp/calls/preAccept | Pre-accept a call |
| WhatsappCallingApi | Reject | Post /whatsapp/calls/reject | Reject a call |
| WhatsappCallingApi | Terminate | Post /whatsapp/calls/terminate | Terminate a call |
| WhatsappFlowsApi | Create | Post /whatsapp/flows | Create a flow |
| WhatsappFlowsApi | Delete | Delete /whatsapp/flows/{flowId} | Delete a flow |
| WhatsappFlowsApi | Deprecate | Post /whatsapp/flows/{flowId}/deprecate | Deprecate a flow |
| WhatsappFlowsApi | List | Get /whatsapp/flows | List flows |
| WhatsappFlowsApi | Preview | Get /whatsapp/flows/{flowId}/preview | generate a web preview URL with this flow. |
| WhatsappFlowsApi | Publish | Post /whatsapp/flows/{flowId}/publish | Publish a flow |
| WhatsappFlowsApi | Retrieve | Get /whatsapp/flows/{flowId} | Retrieve a flow |
| WhatsappFlowsApi | UpdateMetadata | Patch /whatsapp/flows/{flowId}/metadata | Update flow metadata |
| WhatsappFlowsApi | UpdateStructure | Patch /whatsapp/flows/{flowId}/assets | Update flow structure |
| WhatsappInboundMessagesApi | MarkAsRead | Post /whatsapp/inboundMessages/{id}/markAsRead | Mark message as read |
| WhatsappInboundMessagesApi | TypingIndicator | Post /whatsapp/inboundMessages/{id}/typingIndicator | Mark message as read and display a typing indicator |
| WhatsappMediaApi | Upload | Post /whatsapp/media/{phoneNumber}/upload | Upload media |
| WhatsappMessagesApi | Retrieve | Get /whatsapp/messages/{id} | Retrieve a message |
| WhatsappMessagesApi | Send | Post /whatsapp/messages | Enqueue a message |
| WhatsappMessagesApi | SendDirectly | Post /whatsapp/messages/sendDirectly | Send a message directly |
| WhatsappPhoneNumbersApi | List | Get /whatsapp/phoneNumbers | List phone numbers |
| WhatsappPhoneNumbersApi | Register | Post /whatsapp/phoneNumbers/{wabaId}/{phoneNumber}/register | Register a phone number |
| WhatsappPhoneNumbersApi | Retrieve | Get /whatsapp/phoneNumbers/{wabaId}/{phoneNumber} | Retrieve a phone number |
| WhatsappPhoneNumbersApi | RetrieveCommerceSettings | Get /whatsapp/phoneNumbers/{wabaId}/{phoneNumber}/whatsappCommerceSettings | Retrieve commerce settings |
| WhatsappPhoneNumbersApi | RetrieveProfile | Get /whatsapp/phoneNumbers/{wabaId}/{phoneNumber}/profile | Retrieve a phone number profile |
| WhatsappPhoneNumbersApi | RetrieveSettings | Get /whatsapp/phoneNumbers/{wabaId}/{phoneNumber}/settings | Retrieve phone number settings |
| WhatsappPhoneNumbersApi | SaveSettings | Post /whatsapp/phoneNumbers/{wabaId}/{phoneNumber}/settings | Save phone number settings |
| WhatsappPhoneNumbersApi | UpdateCommerceSettings | Patch /whatsapp/phoneNumbers/{wabaId}/{phoneNumber}/whatsappCommerceSettings | Update commerce settings |
| WhatsappPhoneNumbersApi | UpdateDisplayName | Patch /whatsapp/phoneNumbers/{wabaId}/{phoneNumber}/displayName | Update a phone number display name |
| WhatsappPhoneNumbersApi | UpdateProfile | Patch /whatsapp/phoneNumbers/{wabaId}/{phoneNumber}/profile | Update a phone number profile |
| WhatsappTemplatesApi | Create | Post /whatsapp/templates | Create a template |
| WhatsappTemplatesApi | DeleteByName | Delete /whatsapp/templates/{wabaId}/{name} | Delete templates by name |
| WhatsappTemplatesApi | DeleteByNameAndLanguage | Delete /whatsapp/templates/{wabaId}/{name}/{language} | Delete a template |
| WhatsappTemplatesApi | EditByNameAndLanguage | Patch /whatsapp/templates/{wabaId}/{name}/{language} | Edit a template |
| WhatsappTemplatesApi | List | Get /whatsapp/templates | List templates |
| WhatsappTemplatesApi | RetrieveByNameAndLanguage | Get /whatsapp/templates/{wabaId}/{name}/{language} | Retrieve a template |
- AttributeChangeAction
- Balance
- Contact
- ContactAttribute
- ContactAttributeChange
- ContactAttributesChanged
- ContactCreateRequest
- ContactCreated
- ContactCustomAttribute
- ContactDeleted
- ContactPage
- ContactSourceType
- ContactUnsubscribeCreated
- ContactUnsubscribeDeleted
- ContactUpdateRequest
- CustomEventDefinition
- CustomEventDefinitionCreateRequest
- CustomEventDefinitionProperty
- CustomEventDefinitionPropertyCreateRequest
- CustomEventDefinitionPropertyUpdateRequest
- CustomEventDefinitionUpdateRequest
- CustomEventSendRequest
- EmailContentType
- EmailDelivery
- EmailSendRequest
- Error
- ErrorResponse
- Event
- EventProperty
- EventType
- Mailbox
- MetaBusinessAccountVerificationStatus
- Page
- PageCursor
- Sms
- SmsInbound
- SmsPage
- SmsSendRequest
- Unsubscriber
- UnsubscriberChannel
- UnsubscriberCreateRequest
- UnsubscriberPage
- UnsubscriberType
- Verification
- VerificationChannel
- VerificationCheck
- VerificationCheckRequest
- VerificationFallback
- VerificationSendRequest
- VerificationStatus
- Voice
- VoicePage
- VoiceSendRequest
- WebhookEndpoint
- WebhookEndpointCreateRequest
- WebhookEndpointPage
- WebhookEndpointStatus
- WebhookEndpointUpdateRequest
- WhatsappApiError
- WhatsappAuthIntlRateEligibilityCountry
- WhatsappBusinessAccount
- WhatsappBusinessAccountBanState
- WhatsappBusinessAccountPage
- WhatsappBusinessAccountRestrictionInfo
- WhatsappBusinessAccountReviewStatus
- WhatsappBusinessAccountUpdateEventEnum
- WhatsappCallingConnectRequest
- WhatsappCallingPreAcceptRequest
- WhatsappCallingRequest
- WhatsappCallingResponse
- WhatsappCallingTerminateRequest
- WhatsappCommerceSettings
- WhatsappCommerceSettingsUpdateRequest
- WhatsappConversation
- WhatsappConversationOriginType
- WhatsappConversationType
- WhatsappFlow
- WhatsappFlowCategory
- WhatsappFlowCreate200Response
- WhatsappFlowCreate400Response
- WhatsappFlowCreateRequest
- WhatsappFlowList200Response
- WhatsappFlowPreviewUrl
- WhatsappFlowStatus
- WhatsappFlowUpdateMetadata200Response
- WhatsappFlowUpdateMetadataRequest
- WhatsappFlowValidationError
- WhatsappFlowValidationErrorPointersInner
- WhatsappFlowWhatsappBusinessAccount
- WhatsappInboundMessage
- WhatsappInboundMessageButton
- WhatsappInboundMessageContext
- WhatsappInboundMessageError
- WhatsappInboundMessageInteractive
- WhatsappInboundMessageInteractiveButtonReply
- WhatsappInboundMessageInteractiveCallPermissionReply
- WhatsappInboundMessageInteractiveListReply
- WhatsappInboundMessageInteractiveNfmReply
- WhatsappInboundMessageLocation
- WhatsappInboundMessageMedia
- WhatsappInboundMessageOrder
- WhatsappInboundMessageOrderProductItem
- WhatsappInboundMessageReferral
- WhatsappInboundMessageReferredProduct
- WhatsappInboundMessageSystem
- WhatsappInboundMessageText
- WhatsappInboundMessageType
- WhatsappListFlowItem
- WhatsappMedia
- WhatsappMediaUpload200Response
- WhatsappMessage
- WhatsappMessageContact
- WhatsappMessageContactAddress
- WhatsappMessageContactEmail
- WhatsappMessageContactName
- WhatsappMessageContactOrg
- WhatsappMessageContactPhone
- WhatsappMessageContactUrl
- WhatsappMessageContext
- WhatsappMessageInteractive
- WhatsappMessageInteractiveAction
- WhatsappMessageInteractiveActionButton
- WhatsappMessageInteractiveActionButtonReply
- WhatsappMessageInteractiveActionParameters
- WhatsappMessageInteractiveActionParametersFlowActionPayload
- WhatsappMessageInteractiveActionSection
- WhatsappMessageInteractiveActionSectionProductItem
- WhatsappMessageInteractiveActionSectionRow
- WhatsappMessageInteractiveBody
- WhatsappMessageInteractiveFooter
- WhatsappMessageInteractiveHeader
- WhatsappMessageLocation
- WhatsappMessageMedia
- WhatsappMessageMediaAllOf
- WhatsappMessageOrderAmount
- WhatsappMessageOrderBeneficiary
- WhatsappMessageOrderDetails
- WhatsappMessageOrderExpiration
- WhatsappMessageOrderInfo
- WhatsappMessageOrderItem
- WhatsappMessageOrderPaymentGateway
- WhatsappMessageOrderPaymentSetting
- WhatsappMessageOrderPaymentSettingPaymentGatewayBilldesk
- WhatsappMessageOrderPaymentSettingPaymentGatewayPayu
- WhatsappMessageOrderPaymentSettingPaymentGatewayRazorpay
- WhatsappMessageOrderPaymentSettingPaymentGatewayZaakpay
- WhatsappMessageOrderStatus
- WhatsappMessageOrderStatusEnum
- WhatsappMessageReaction
- WhatsappMessageSendRequest
- WhatsappMessageStatus
- WhatsappMessageTemplate
- WhatsappMessageTemplateComponent
- WhatsappMessageTemplateComponentCard
- WhatsappMessageTemplateComponentCardComponent
- WhatsappMessageTemplateComponentParameter
- WhatsappMessageTemplateComponentParameterAction
- WhatsappMessageTemplateComponentParameterActionSection
- WhatsappMessageTemplateComponentParameterActionSectionProductItem
- WhatsappMessageTemplateComponentParameterLimitedTimeOffer
- WhatsappMessageTemplateLanguage
- WhatsappMessageText
- WhatsappMessageType
- WhatsappPayment
- WhatsappPaymentStatus
- WhatsappPaymentTransaction
- WhatsappPaymentTransactionError
- WhatsappPhoneNameUpdateRequest
- WhatsappPhoneNameUpdateResponse
- WhatsappPhoneNumber
- WhatsappPhoneNumberCodeVerificationStatus
- WhatsappPhoneNumberNameStatus
- WhatsappPhoneNumberPage
- WhatsappPhoneNumberProfile
- WhatsappPhoneNumberProfileUpdateRequest
- WhatsappPhoneNumberProfileVertical
- WhatsappPhoneNumberQualityRating
- WhatsappPhoneNumberQualityUpdateEventEnum
- WhatsappPhoneNumberSettings
- WhatsappPhoneNumberSettingsCalling
- WhatsappPhoneNumberStatus
- WhatsappPricingCategory
- WhatsappPricingModel
- WhatsappPricingType
- WhatsappProfile
- WhatsappReviewDecision
- WhatsappTemplate
- WhatsappTemplateCategory
- WhatsappTemplateComponent
- WhatsappTemplateComponentButton
- WhatsappTemplateComponentButtonOtpSupportedApp
- WhatsappTemplateComponentButtonOtpType
- WhatsappTemplateComponentButtonType
- WhatsappTemplateComponentCard
- WhatsappTemplateComponentCardComponent
- WhatsappTemplateComponentExample
- WhatsappTemplateComponentLimitedTimeOffer
- WhatsappTemplateCreateRequest
- WhatsappTemplateEditRequest
- WhatsappTemplatePage
- WhatsappTemplateQualityRating
- WhatsappTemplateStatus
- WhatsappTemplateStatusUpdateEventEnum
- WhatsappTemplateSubCategory
- Type: API key
- API key parameter name: X-API-Key
- Location: HTTP header
Configure API key:
import ycloud "github.com/ycloud-developers/ycloud-sdk-go"
configuration := ycloud.NewConfiguration()
configuration.AddDefaultHeader("X-API-Key", "YOUR_API_KEY")Due to the fact that model structure members are all pointers, this package contains a number of utility functions to easily obtain pointers to values of basic types. Each of these functions takes a value of the given basic type and returns a pointer to it:
PtrBoolPtrIntPtrInt32PtrInt64PtrFloatPtrFloat32PtrFloat64PtrStringPtrTime