PUT
/
forecast
Contribute CoCoRaHS and NWS data to improve forecast accuracy.
curl --request PUT \
  --url https://weather.io/forecast/forecast \
  --header 'Content-Type: application/json' \
  --header 'X-API-Key: <api-key>' \
  --data '{
  "city": "Albuquerque",
  "zipCode": "87101",
  "dataType": "CoCoRaHS",
  "dataValue": "0.5 inches"
}'
{
  "message": "Data contribution successful. Thank you for helping improve our forecasts!"
}

Authorizations

X-API-Key
string
header
required

Headers

X-API-Key
string
required

Your API key for authentication. This key is required to access this endpoint.

Query Parameters

city
string
required

Name of the city for which the data is being contributed.

zipCode
string

Optional ZIP Code for the city. If provided, it will be used to derive the city name.

dataCategory
string
required

Category of data being contributed (e.g., precipitation, temperature).

precipitationType
enum<string>
default:Rain

Type of precipitation being reported. Can be one of the following- 'Rain, Snow, Hail, Sleet, Slurry, Ice, Mixed, or Other.' Default is 'Rain'. If 'Other', then define the precipiationType in additionalInfo

Available options:
Rain,
Snow,
Hail,
Sleet,
Slurry,
Ice,
Mixed,
Other
dataType
enum<string>
required

Type of data being contributed (e.g., CoCoRaHS or NWS).

Available options:
CoCoRaHS,
NWS
dataValue
string
required

The actual data value being contributed (e.g., precipitation amount).

unit
enum<string>
default:Metric

The unit of measurement for the data value. Can be either 'Metric' or 'Imperial'. Default is 'Metric'.

Available options:
Metric,
Imperial
forecastLength
integer
default:1

The number of days for which the data is being contributed. Default is 1 day, maximum is 7 days.

Required range: 1 <= x <= 7
additionalInfo
string

Optional additional information about the data being contributed (e.g., notes or comments).

Body

application/json

Response

200
application/json

Successful contribution of data.

The response is of type object.