API

Build cool stuff that works with Remember The Milk.

menu

rtm.push.subscribe

Description

Creates a new subscription.

Availability

Available in versions 1 and 2.

Authentication

This method requires authentication with write permissions.

Timeline

This method requires a timeline.

Arguments

api_key (Required) 1 2
Your API application key. See here for more details.
url (Required) 1 2
The URL for the subscription endpoint. Must be unique for this user, i.e. no two subscriptions for a given user may use the same callback URL. Only https protocol is supported.
topics (Required) 1 2
A comma delimited list of topics.
push_format (Required) 1 2
A format of the push request.
lease_seconds 1 2
Number of seconds for which the subscription will be valid. Legal values are 60 to 86400 (1 minute to 1 day). If not present, the subscription will be auto-renewing.
timeline (Required) 1 2
The timeline within which to run a method. See here for more details.
filter 1 2
If specified, notifications will be sent only for tasks matched by the provided criteria. See here for supported criteria. Task filtering is available only for the following topics: task_created, task_completed, task_tagged, and script_executed.

Example Response

<subscription id="10871" url="https://hook.example" format="xml" expires="2022-05-09T14:00:00Z" pending="0">
    <topics>
      <topic>changes_available</topic>
      <topic>task_completed</topic>
      <topic>task_created</topic>
      <topic>task_received</topic>
      <topic>task_tagged</topic>
      <topic>script_executed</topic>
    </topics>
  </subscription>

Error Codes

96 Invalid signature
The passed signature was invalid.
97 Missing signature
The call required signing but no signature was sent.
98 Login failed / Invalid auth token
The login details or auth token passed were invalid.
99 User not logged in / Insufficient permissions
The method requires user authentication but the user was not logged in, or the authenticated method call did not have the required permissions.
100 Invalid API Key
The API key passed was not valid or has expired.
105 Service currently unavailable
The requested service is temporarily unavailable.
114 Invalid SOAP envelope
The SOAP envelope sent in the request could not be parsed.
115 Invalid XML-RPC Method Call
The XML-RPC request document could not be parsed.
120 Method not valid for requested version
The requested method is not compatible with the requested version.
300 Timeline invalid or not provided
No timeline provided / Timeline invalid.
6000 Subscription callback URL is invalid or empty.
Subscription callback URL cannot be empty. Only https protocol is supported.
6001 Subscription topics are invalid or empty.
Subscription topics cannot be empty.
6002 Subscription format is invalid or empty.
Subscription format cannot be empty.